emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d76c007: Make sure exiting todo-mode buffer buries


From: Stephen Berman
Subject: [Emacs-diffs] master d76c007: Make sure exiting todo-mode buffer buries it (bug#27121)
Date: Sun, 28 May 2017 18:25:58 -0400 (EDT)

branch: master
commit d76c0078986b72bd83741f16f4db83c1b31de520
Author: Stephen Berman <address@hidden>
Commit: Stephen Berman <address@hidden>

    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.
---
 lisp/calendar/todo-mode.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 5d4fcf8..8155a42 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -820,14 +820,10 @@ buries it and restores state as needed."
               (message "There is no todo file for this archive")))
           ;; When todo-check-file runs in todo-show, it kills the
           ;; buffer if the archive file was deleted externally.
-          (when (buffer-live-p buf) (bury-buffer buf)))
+          (when (buffer-live-p buf) (kill-buffer buf)))
          ((eq major-mode 'todo-mode)
           (todo-save)
-          ;; If we just quit archive mode, just burying the buffer
-          ;; in todo-mode would return to archive.
-          (set-window-buffer (selected-window)
-                             (set-buffer (other-buffer)))
-          (bury-buffer buf)))))
+          (bury-buffer)))))
 
 ;; 
-----------------------------------------------------------------------------
 ;;; Navigation between and within categories



reply via email to

[Prev in Thread] Current Thread [Next in Thread]