From 767713682c21b2e96abdce11741c065899656f75 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Sep 2020 11:50:15 +0300 Subject: [PATCH] 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. --- lisp/menu-bar.el | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5