aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Berman2017-05-28 22:52:05 +0200
committerStephen Berman2017-05-29 00:06:22 +0200
commitd76c0078986b72bd83741f16f4db83c1b31de520 (patch)
tree1ea19ecffcefec0fdd50a6393b17851af46ca9e6
parente7bb7cc29bc27b368a066c088943c93b1c689b23 (diff)
downloademacs-d76c0078986b72bd83741f16f4db83c1b31de520.tar.gz
emacs-d76c0078986b72bd83741f16f4db83c1b31de520.zip
Make sure exiting todo-mode buffer buries it (bug#27121)
This failed due to commit ea3ae33b from 2013-05-16, which prevented quitting todo-mode buffer after visiting todo-archive buffer from making the archive buffer current again. Avoid this now by simply killing the archive buffer, since there's no need to keep it a live buffer. Consequently, quitting a todo-mode buffer can now use bury-buffer without an argument, which ensures that is will not becomes current on quitting the buffer that replaced it in the window. * lisp/calendar/todo-mode.el (todo-quit): Kill todo-archive-mode buffer instead of burying it. This now allows exiting the todo-mode buffer by bury-buffer without an argument, so do that.
-rw-r--r--lisp/calendar/todo-mode.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 5d4fcf8fcbf..8155a4241a7 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -820,14 +820,10 @@ buries it and restores state as needed."
820 (message "There is no todo file for this archive"))) 820 (message "There is no todo file for this archive")))
821 ;; When todo-check-file runs in todo-show, it kills the 821 ;; When todo-check-file runs in todo-show, it kills the
822 ;; buffer if the archive file was deleted externally. 822 ;; buffer if the archive file was deleted externally.
823 (when (buffer-live-p buf) (bury-buffer buf))) 823 (when (buffer-live-p buf) (kill-buffer buf)))
824 ((eq major-mode 'todo-mode) 824 ((eq major-mode 'todo-mode)
825 (todo-save) 825 (todo-save)
826 ;; If we just quit archive mode, just burying the buffer 826 (bury-buffer)))))
827 ;; in todo-mode would return to archive.
828 (set-window-buffer (selected-window)
829 (set-buffer (other-buffer)))
830 (bury-buffer buf)))))
831 827
832;; ----------------------------------------------------------------------------- 828;; -----------------------------------------------------------------------------
833;;; Navigation between and within categories 829;;; Navigation between and within categories