diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fc20b732..41d18f090 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-24 Bastien Guerry + + * org-timer.el (org-timer-set-timer): Fix bug about cancelling + timers. + 2010-05-21 Carsten Dominik * org.el (org-emph-re): Document the match groups. diff --git a/lisp/org-src.el b/lisp/org-src.el index 0ac8e6c23..63c749cce 100644 --- a/lisp/org-src.el +++ b/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) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 72e2c9e1a..de10280ad 100644 --- a/lisp/org-timer.el +++ b/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 ()