]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/vc: Try and avoid quoting lambdas
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 19 Jul 2025 18:42:12 +0000 (14:42 -0400)
committerEshel Yaron <me@eshelyaron.com>
Fri, 25 Jul 2025 08:10:19 +0000 (10:10 +0200)
* 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
lisp/vc/vc-hg.el

index db5c7186bbe9c05a876244fc0f4b9791a0205416..dd536c5674f3b3e4c5e344aca9cbeee6f0ca880b 100644 (file)
@@ -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
index 761e802eb229a80d1d0912dc7f5e092d2d7eed5a..4e9057db4f901f48e868a7c3321491e21b47319a 100644 (file)
@@ -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)