[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not exp
From: |
Stefan Monnier |
Subject: |
bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs |
Date: |
Mon, 05 Feb 2024 12:00:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> For my information: the problem here is that
> `gnus-category-make-function' runs `gnus-byte-compile' on a form like
> this:
BTW, `gnus-category-make-function` is a misnomer since it does not
return a function.
> (lambda nil (not (#f(compiled-function () #<bytecode 0x1980ad44c232>))))
>
> And the extra parens around (#f(compiled-function...)) are not strictly legal?
A Lisp function call has the form (FUN . ARGS) where FUN is not expected
to be a function *value* but rather should be a function name (and we
also tolerate a lambda expression, which is a function's source code).
The patch below should fix the core of the problem, but it probably
requires corresponding adjustments in `gnus-function-implies-unread-1`
and `gnus-category-make-function`.
Stefan
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 604eea4c33d..cfcbea2e233 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -2911,13 +2911,9 @@
(car func)
(gnus-byte-compile `(lambda () ,func)))))
-(defun gnus-agent-true ()
- "Return t."
- t)
+(defalias 'gnus-agent-true #'always)
-(defun gnus-agent-false ()
- "Return nil."
- nil)
+(defalias 'gnus-agent-false #'ignore)
(defun gnus-category-make-function-1 (predicate)
"Make a function from PREDICATE."
@@ -2925,8 +2921,9 @@ gnus-category-make-function-1
;; 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
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Dan Christensen, 2024/02/04
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eli Zaretskii, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Mattias EngdegÄrd, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eli Zaretskii, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eric Abrahamsen, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs,
Stefan Monnier <=
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eric Abrahamsen, 2024/02/06
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Stefan Monnier, 2024/02/06
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eric Abrahamsen, 2024/02/06
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Dan Christensen, 2024/02/21
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eric Abrahamsen, 2024/02/21
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Stefan Monnier, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Mattias EngdegÄrd, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Dan Christensen, 2024/02/05
- bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs, Eli Zaretskii, 2024/02/05