Browse Source

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 15 years ago
parent
commit
31c14d58b6
3 changed files with 12 additions and 3 deletions
  1. 5 0
      lisp/ChangeLog
  2. 5 2
      lisp/org-src.el
  3. 2 1
      lisp/org-timer.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-05-24  Bastien Guerry  <bzg@altern.org>
+
+	* org-timer.el (org-timer-set-timer): Fix bug about cancelling
+	timers.
+
 2010-05-21  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-emph-re): Document the match groups.

+ 5 - 2
lisp/org-src.el

@@ -644,8 +644,11 @@ the language, a switch telling if the content should be in a single line."
 	  (setq buffer-file-name
 		(concat (buffer-file-name (marker-buffer org-edit-src-beg-marker))
 			"[" (buffer-name) "]"))
-	  (set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions)
-	       '(org-edit-src-save)))
+	  (if (featurep 'xemacs)
+	      (progn
+		(make-variable-buffer-local 'write-contents-hooks) ; needed only for 21.4
+		(setq write-contents-hooks '(org-edit-src-save)))
+	    (setq write-contents-functions '(org-edit-src-save))))
       (setq buffer-read-only t))))
 
 (org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)

+ 2 - 1
lisp/org-timer.el

@@ -338,7 +338,8 @@ VALUE can be `on', `off', or `pause'."
 		     (y-or-n-p "Replace current timer? "))
 		(not org-timer-current-timer))
 	  (progn
-	    (cancel-timer org-timer-current-timer)
+	    (when org-timer-current-timer
+	      (cancel-timer org-timer-current-timer))
 	    (setq org-timer-current-timer
 		  (run-with-timer
 		   secs nil `(lambda ()