]> git.eshelyaron.com Git - emacs.git/commitdiff
Use funcall on function values in gnus-agent.el
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 3 Mar 2024 02:07:36 +0000 (18:07 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 3 Mar 2024 17:05:24 +0000 (18:05 +0100)
See bug#68931

* lisp/gnus/gnus-agent.el (gnus-category-make-function-1): Don't just
pass function values in to be byte compiled, wrap them in funcall first.

(cherry picked from commit 7f8717c6fd3e19b41048ce9a391d59540886cdee)

lisp/gnus/gnus-agent.el

index 1726b806913b7c221c1903bbcb972a0017f09c36..0928b1797877f56885f49ec064fe592dd9c50ce0 100644 (file)
@@ -2920,8 +2920,9 @@ The following commands are available:
    ;; Functions are just returned as is.
    ((or (symbolp predicate)
        (functionp predicate))
-    `(,(or (cdr (assq predicate gnus-category-predicate-alist))
-          predicate)))
+    (let ((fun (or (cdr (assq predicate gnus-category-predicate-alist))
+                  predicate)))
+      (if (symbolp fun) `(,fun) `(funcall ',fun))))
    ;; More complex predicate.
    ((consp predicate)
     `(,(cond