]> git.eshelyaron.com Git - emacs.git/commitdiff
Mark easy-menu-do-define menus as "not interesting"
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2021 12:31:10 +0000 (13:31 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 14 Feb 2021 12:31:10 +0000 (13:31 +0100)
* lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Mark menu
keymaps as "not interesting" when doing completion.

lisp/emacs-lisp/easymenu.el

index 5303da3746c8d6f8bcdb27ad9a622645e8479222..39b3193b2f4b2d8074c8246addfee6a3167897f8 100644 (file)
@@ -183,7 +183,10 @@ This is expected to be bound to a mouse event."
                                                  :filter)
                                       'identity)
                                   (symbol-function symbol)))
-                            symbol)))))
+                            symbol))))
+      ;; These symbols are commands, but not interesting for users
+      ;; to `M-x TAB'.
+      (put symbol 'completion-predicate 'ignore))
     (dolist (map (if (keymapp maps) (list maps) maps))
       (define-key map
         (vector 'menu-bar (easy-menu-intern (car menu)))