mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-21 12:03:55 -08:00
Fix updating buffer menu after invoking "M-x term"
The doc string of 'frame-or-buffer-changed-p' says not to call it with the nil argument, but term.el did. Since "M-x term" puts 'term--update-term-menu' on the 'menu-bar-update-hook' ahead of 'menu-bar-update-buffers', it caused the latter decide that there was no change in buffers, because the internal state variable used by 'frame-or-buffer-changed-p' when called with the nil argument was reset by 'term--update-term-menu'. Fix that by using a non-nil state variable. * lisp/term.el (term--buffers-changed): New variable. (term--update-term-menu): Use it when calling 'frame-or-buffer-changed-p'. (Bug#80231)
This commit is contained in:
parent
fe2469c1c1
commit
d4dbce74a7
1 changed files with 3 additions and 1 deletions
|
|
@ -1009,9 +1009,11 @@ For custom keybindings purposes please note there is also
|
|||
["Paging" term-pager-toggle :style toggle :selected term-pager-count
|
||||
:help "Toggle paging feature"]))
|
||||
|
||||
(defvar term--buffers-changed nil)
|
||||
|
||||
(defun term--update-term-menu (&optional force)
|
||||
(when (and (lookup-key term-mode-map [menu-bar terminal])
|
||||
(or force (frame-or-buffer-changed-p)))
|
||||
(or force (frame-or-buffer-changed-p 'term--buffers-changed)))
|
||||
(let ((buffer-list (match-buffers '(derived-mode . term-mode))))
|
||||
(easy-menu-change
|
||||
nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue