Ver Fonte

Don't call kill-this-buffer outside of menus

* contrib/lisp/org-toc.el (org-toc-quit):
* lisp/org-mhe.el (org-mhe-follow-link): Use kill-buffer rather than
  menu-bar.el's kill-this-buffer.

See Emacs bug#26466 and discussion on emacs.devel:
https://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00346.html.

This is in favor of backporting Emacs's 2e4f4c9d48 (Don't call
'kill-this-buffer' outside of menus, 2017-04-12), which introduces a
new function kill-current-buffer that provides special handling of
minibuffers.
Kyle Meyer há 8 anos atrás
pai
commit
7fb6ab52c4
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 1 1
      contrib/lisp/org-toc.el
  2. 2 2
      lisp/org-mhe.el

+ 1 - 1
contrib/lisp/org-toc.el

@@ -354,7 +354,7 @@ If DELETE is non-nil, delete other windows when in the Org buffer."
 (defun org-toc-quit ()
   "Quit the current Org TOC buffer."
   (interactive)
-  (kill-this-buffer)
+  (kill-buffer)
   (other-window 1)
   (delete-other-windows))
 

+ 2 - 2
lisp/org-mhe.el

@@ -203,7 +203,7 @@ folders."
 	  (mh-search folder (list "--message-id" article))
 	  (when (and org-mhe-search-all-folders
 		     (not (org-mhe-get-message-real-folder)))
-	    (kill-this-buffer)
+	    (kill-buffer)
 	    (mh-search "+" (list "--message-id" article))))
       (if mh-search-regexp-builder
 	  (mh-search "+" (funcall mh-search-regexp-builder
@@ -211,7 +211,7 @@ folders."
 	(mh-search "+" article)))
     (if (org-mhe-get-message-real-folder)
 	(mh-show-msg 1)
-      (kill-this-buffer)
+      (kill-buffer)
       (error "Message not found"))))
 
 (provide 'org-mhe)