From: Stefan Kangas Date: Sat, 19 Aug 2023 11:23:24 +0000 (+0200) Subject: * lisp/term.el (term--update-term-menu): Simplify. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fe0d134f48fe5b708f8f3347fb7643d17008b7e0;p=emacs.git * lisp/term.el (term--update-term-menu): Simplify. --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e1d14474323..6f35b3cc1b1 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -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 diff --git a/lisp/term.el b/lisp/term.el index 8f5f3de4531..b8466b21332 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -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"