From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: 68931@debbugs.gnu.org
Cc: jdc@uwo.ca, mattias.engdegard@gmail.com, eliz@gnu.org,
monnier@iro.umontreal.ca
Subject: bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs
Date: Tue, 06 Feb 2024 12:42:04 -0800 [thread overview]
Message-ID: <87a5od1g0z.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <jwva5oeyhuf.fsf-monnier+emacs@gnu.org> (Stefan Monnier via's message of "Mon, 05 Feb 2024 12:00:42 -0500")
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
>> 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.
I'll add a FIXME...
>> (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).
Thanks! I guess I never understood that explicitly.
> 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`.
I'll try this out, and see what's necessary to make it work.
In general I think Gnus goes to a lot of this kind of effort, based on
performance considerations that are no longer current. Especially with
native compilation available, I suspect there's no real need to keep
byte-compiling things on the fly.
>
> 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
next prev parent reply other threads:[~2024-02-06 20:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 22:11 bug#68931: 30.0.50; Gnus byte-compilation error with (display . [not expire]) with git emacs Dan Christensen
2024-02-05 12:50 ` Eli Zaretskii
2024-02-05 14:00 ` Mattias Engdegård
2024-02-05 14:32 ` Eli Zaretskii
2024-02-05 15:42 ` Eric Abrahamsen
2024-02-05 17:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-06 20:42 ` Eric Abrahamsen [this message]
2024-02-06 20:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-06 21:08 ` Eric Abrahamsen
2024-02-21 19:28 ` Dan Christensen
2024-02-21 22:05 ` Eric Abrahamsen
2024-03-03 2:30 ` Eric Abrahamsen
2024-02-05 14:33 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-05 17:13 ` Mattias Engdegård
2024-02-05 17:23 ` Dan Christensen
2024-02-05 19:12 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5od1g0z.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=68931@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jdc@uwo.ca \
--cc=mattias.engdegard@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.