From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87ttmnop61.fsf@uwo.ca> <86r0hr13eu.fsf@gnu.org> <523B7DE4-EA66-4686-845A-35CDCC575F92@gmail.com> <86jznj0yol.fsf@gnu.org> <87fry63ojy.fsf@ericabrahamsen.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13007"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68931@debbugs.gnu.org, Eli Zaretskii , jdc@uwo.ca, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 05 18:02:52 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rX2Mt-0003C1-OV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Feb 2024 18:02:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX2MR-0001ZL-Bu; Mon, 05 Feb 2024 12:02:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX2Lu-0001Lt-MM for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:01:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rX2Lt-0001ov-G7 for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:01:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rX2M5-0007zi-MC for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2024 12:02:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2024 17:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68931 X-GNU-PR-Package: emacs Original-Received: via spool by 68931-submit@debbugs.gnu.org id=B68931.170715246830668 (code B ref 68931); Mon, 05 Feb 2024 17:02:01 +0000 Original-Received: (at 68931) by debbugs.gnu.org; 5 Feb 2024 17:01:08 +0000 Original-Received: from localhost ([127.0.0.1]:52198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX2LD-0007yZ-SL for submit@debbugs.gnu.org; Mon, 05 Feb 2024 12:01:08 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rX2LA-0007xt-U9 for 68931@debbugs.gnu.org; Mon, 05 Feb 2024 12:01:06 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5648C441BC2; Mon, 5 Feb 2024 12:00:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1707152445; bh=DWLvRDFCTEq07d/aDPt3zvnGXiH/F1ZvOY5CXKmJjpk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=i9Cf6DcCYYGmUn7mnG0t5PClBSIJXjCH7HlfsG0uHJXrN356iFinDsTxF4CLZJUBf Ma0hyNg08wwX4hOxgfjbgV37jbPuBEM4rCUd0IshDTb4iuOEeNpoOB4T7Tkcc28dAo heIWJGskRzf/UdV17Rwde9fOePiT4Eq+Y8JlBBe7xZ8Afds8V5iCDWqhG+34834wR1 XjNIgIcpES37ekHFP8GYXba7V+Uwwle6gJuhERUL5nkyTXQpCLXbmxaMgU+PhPmt8/ AvmU9ycNyPBPi19BlUfTCSLpmUL24fdhxLSR9+oFxo86M/nbPG3astJ0yikpdDnm9N OHT5xnOGNneGQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 014C7441712; Mon, 5 Feb 2024 12:00:45 -0500 (EST) Original-Received: from pastel (69-165-153-17.dsl.teksavvy.com [69.165.153.17]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8699D120387; Mon, 5 Feb 2024 12:00:44 -0500 (EST) In-Reply-To: <87fry63ojy.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 05 Feb 2024 07:42:41 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279455 Archived-At: > 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 () #)))) > > 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