]> git.eshelyaron.com Git - emacs.git/commitdiff
term--update-term-menu: Add the menu to term-terminal-menu
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 1 Dec 2022 22:14:28 +0000 (15:14 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Thu, 1 Dec 2022 22:14:42 +0000 (15:14 -0700)
Reading bug#5641, the intention was to add this to the existing
"Terminal" menu for term-mode buffers, not to the local keymaps of all
other buffers.  Moreover, the existing code signaled errors when
switching to buffers with no local keymap, such as term-mode buffers
whose processes have died.

* lisp/term.el (term--update-term-menu): Add the menu to
term-terminal-menu, instead of implicitly trying to add it to every
local keymap.

lisp/term.el

index 6f3306b088119f4f13275eec9a77fb25e4e9a734..550aa781cc59f60658987b3c0868b0901f37d82b 100644 (file)
@@ -976,7 +976,7 @@ underlying shell."
                                        'term-mode))
             (buffer-list))))
       (easy-menu-change
-       '("Terminal")
+       nil
        "Terminal Buffers"
        (mapcar
         (lambda (buffer)
@@ -986,7 +986,9 @@ underlying shell."
                   (lambda ()
                     (interactive)
                     (switch-to-buffer buffer))))
-        buffer-list)))))
+        buffer-list)
+       nil
+       term-terminal-menu))))
 
 (easy-menu-define term-signals-menu
  (list term-mode-map term-raw-map term-pager-break-map)