From: Stefan Monnier Date: Tue, 1 Jul 2025 21:37:02 +0000 (-0400) Subject: cus-edit.el: Don't quote lambdas and improve macro declaration X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=beba029ae91e75c2030aa92a54766777c02a8179;p=emacs.git cus-edit.el: Don't quote lambdas and improve macro declaration * lisp/cus-edit.el (custom-reset-extended-menu): Don't quote lambdas. (custom-dirlocals-with-buffer): Add indent and debug info. (cherry picked from commit f732a44af801a11467b160d5efc0c7aa7d11266e) --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index ec894ab8ee5..b7e212a1fcb 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -795,24 +795,24 @@ when the action is chosen.") (defvar custom-reset-extended-menu (let ((map (make-sparse-keymap))) (define-key-after map [Custom-reset-current] - '(menu-item "Undo Edits in Customization Buffer" Custom-reset-current - :enable (seq-some (lambda (option) - (eq (widget-get option :custom-state) - 'modified)) + `(menu-item "Undo Edits in Customization Buffer" Custom-reset-current + :enable (seq-some ,(lambda (option) + (eq (widget-get option :custom-state) + 'modified)) custom-options))) (define-key-after map [Custom-reset-saved] - '(menu-item "Revert This Session's Customizations" Custom-reset-saved - :enable (seq-some (lambda (option) - (memq (widget-get option :custom-state) - '(modified set changed rogue))) + `(menu-item "Revert This Session's Customizations" Custom-reset-saved + :enable (seq-some ,(lambda (option) + (memq (widget-get option :custom-state) + '(modified set changed rogue))) custom-options))) (when (or custom-file user-init-file) (define-key-after map [Custom-reset-standard] - '(menu-item "Erase Customizations" Custom-reset-standard + `(menu-item "Erase Customizations" Custom-reset-standard :enable (seq-some - (lambda (option) - (memq (widget-get option :custom-state) - '(modified set changed rogue saved))) + ,(lambda (option) + (memq (widget-get option :custom-state) + '(modified set changed rogue saved))) custom-options)))) map) "A menu for the \"Revert...\" button. @@ -6142,6 +6142,7 @@ Moves point into the widget that holds the value." "Arrange to execute BODY in a \"*Customize Dirlocals*\" buffer." ;; We don't use `custom-buffer-create' because the settings here ;; don't go into the `custom-file'. + (declare (indent 0) (debug t)) `(progn (switch-to-buffer "*Customize Dirlocals*")