From fbc334b57c9b35bdf99dd3358965c4197698a0c3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 19 Jul 2025 14:42:12 -0400 Subject: [PATCH] lisp/vc: Try and avoid quoting lambdas * lisp/vc/pcvs.el (cvs-menu, cvs-minor-mode-map): * lisp/vc/vc-hg.el (vc-hg--extract-headers): * lisp/vc/vc-git.el (vc-git-show-stash): Don't quote lambdas. (cherry picked from commit e35e18ac18cfa968978ec7fbfa59432fc1852178) --- lisp/vc/vc-git.el | 12 ++++++------ lisp/vc/vc-hg.el | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index db5c7186bbe..dd536c5674f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -241,14 +241,14 @@ The following place holders should be present in the string: Default t means all, otherwise an integer specifying the maximum number to show. A text button is always shown allowing you to toggle display of the entire list." - :type '(choice (const :tag "All" t) + :type `(choice (const :tag "All" t) (integer :tag "Limit" :validate - (lambda (widget) - (unless (>= (widget-value widget) 0) - (widget-put widget :error - "Invalid value: must be a non-negative integer") - widget)))) + ,(lambda (widget) + (unless (>= (widget-value widget) 0) + (widget-put widget :error + "Invalid value: must be a non-negative integer") + widget)))) :version "27.1") (defcustom vc-git-revision-complete-only-branches nil diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 761e802eb22..4e9057db4f9 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -1260,9 +1260,9 @@ REV is ignored." (defun vc-hg--extract-headers (comment) (log-edit-extract-headers `(("Author" . "--user") ("Date" . "--date") - ("Amend" . (lambda (value) - (when (equal value "yes") - (list "--amend"))))) + ("Amend" . ,(lambda (value) + (when (equal value "yes") + (list "--amend"))))) comment)) (defun vc-hg-find-revision (file rev buffer) -- 2.39.5