]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/term.el (term--update-term-menu): Simplify.
authorStefan Kangas <stefankangas@gmail.com>
Sat, 19 Aug 2023 11:23:24 +0000 (13:23 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sun, 20 Aug 2023 16:23:16 +0000 (18:23 +0200)
lisp/progmodes/project.el
lisp/term.el

index e1d14474323c95c54821607da53f035e23de902e..6f35b3cc1b1eb88e1136d800fab15430bc740f44 100644 (file)
@@ -1491,6 +1491,7 @@ Used by `project-kill-buffers'."
   :package-version '(project . "0.8.2"))
 ;;;###autoload(put 'project-kill-buffers-display-buffer-list 'safe-local-variable #'booleanp)
 
+;; FIXME: Could this be replaced by `buffer-match-p' in Emacs 29+?
 (defun project--buffer-check (buf conditions)
   "Check if buffer BUF matches any element of the list CONDITIONS.
 See `project-kill-buffer-conditions' or
index 8f5f3de4531e6087f9f24fbb6c968b092bc3eee9..b8466b213320929775b68a2d410745a6f85c6382 100644 (file)
@@ -972,12 +972,7 @@ underlying shell."
 (defun term--update-term-menu (&optional force)
   (when (and (lookup-key term-mode-map [menu-bar terminal])
              (or force (frame-or-buffer-changed-p)))
-    (let ((buffer-list
-           (seq-filter
-            (lambda (buffer)
-              (provided-mode-derived-p (buffer-local-value 'major-mode buffer)
-                                       'term-mode))
-            (buffer-list))))
+    (let ((buffer-list (match-buffers '(derived-mode . term-mode))))
       (easy-menu-change
        nil
        "Terminal Buffers"