]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/menu-bar.el (menu-bar-search-options-menu): Don't quote lambdas
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 8 Jul 2023 19:08:10 +0000 (15:08 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 8 Jul 2023 19:08:10 +0000 (15:08 -0400)
Expose the commands to the compiler.

lisp/menu-bar.el

index 21785e43a6e2d3e7f34c109df759eefa62b38999..030fe3745989bb796240e3e2aa97ab04d05b4aaa 100644 (file)
@@ -1464,30 +1464,30 @@ mail status in mode line"))
                  (word-search-regexp "Whole Words" "Whole word")))
       (bindings--define-key menu (vector (nth 0 x))
         `(menu-item ,(nth 1 x)
-                    (lambda ()
-                      (interactive)
-                      (setq search-default-mode #',(nth 0 x))
-                      (message ,(format "%s search enabled" (nth 2 x))))
+                    ,(lambda ()
+                       (interactive)
+                       (setq search-default-mode (nth 0 x))
+                       (message "%s search enabled" (nth 2 x)))
                     :help ,(format "Enable %s search" (downcase (nth 2 x)))
                     :button (:radio . (eq search-default-mode #',(nth 0 x))))))
 
     (bindings--define-key menu [regexp-search]
-      '(menu-item "Regular Expression"
-                  (lambda ()
-                    (interactive)
-                    (setq search-default-mode t)
-                    (message "Regular-expression search enabled"))
+      `(menu-item "Regular Expression"
+                  ,(lambda ()
+                     (interactive)
+                     (setq search-default-mode t)
+                     (message "Regular-expression search enabled"))
                   :help "Enable regular-expression search"
                   :button (:radio . (eq search-default-mode t))))
 
     (bindings--define-key menu [regular-search]
-      '(menu-item "Literal Search"
-                  (lambda ()
-                    (interactive)
-                    (when search-default-mode
-                      (setq search-default-mode nil)
-                      (when (symbolp search-default-mode)
-                        (message "Literal search enabled"))))
+      `(menu-item "Literal Search"
+                  ,(lambda ()
+                     (interactive)
+                     (when search-default-mode
+                       (setq search-default-mode nil)
+                       (when (symbolp search-default-mode)
+                         (message "Literal search enabled"))))
                   :help "Disable special search modes"
                   :button (:radio . (not search-default-mode))))