From: Eli Zaretskii Date: Sat, 26 Sep 2020 08:50:15 +0000 (+0300) Subject: Enable "Continue Tags Search" menu item only when it can be used X-Git-Tag: emacs-27.1.90~133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=767713682c;p=emacs.git Enable "Continue Tags Search" menu item only when it can be used * lisp/menu-bar.el (menu-bar-search-menu) : Enable only when there was a previous tags search. (Bug#43569) (menu-bar-replace-menu) : Enable only when there was a previous tags-replace. --- diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 37e046ffddf..ef64c74acda 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -333,6 +333,8 @@ (bindings--define-key menu [tags-continue] '(menu-item "Continue Tags Search" fileloop-continue + :enable (and (featurep 'fileloop) + (not (eq fileloop--operate-function 'ignore))) :help "Continue last tags search operation")) (bindings--define-key menu [tags-srch] '(menu-item "Search Tagged Files..." tags-search @@ -382,6 +384,8 @@ (let ((menu (make-sparse-keymap "Replace"))) (bindings--define-key menu [tags-repl-continue] '(menu-item "Continue Replace" fileloop-continue + :enable (and (featurep 'fileloop) + (not (eq fileloop--operate-function 'ignore))) :help "Continue last tags replace operation")) (bindings--define-key menu [tags-repl] '(menu-item "Replace in Tagged Files..." tags-query-replace