GNU bug report logs - #27229
eldoc wrong highlighting for "when"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: "Charles A. Roelli" <charles@HIDDEN>; Keywords: confirmed; dated Sun, 4 Jun 2017 10:21:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 4 Sep 2021 13:45:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 09:45:31 2021
Received: from localhost ([127.0.0.1]:46897 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMVz8-00052U-TL
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 09:45:31 -0400
Received: from quimby.gnus.org ([95.216.78.240]:41642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mMVz6-00052H-S0
 for 27229 <at> debbugs.gnu.org; Sat, 04 Sep 2021 09:45:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=pM23vJ/3EQKojU5F5drLysxtF0jNewJSJ1JwFp6X1LA=; b=WSUIaNuDdRPJR9E3gc7cNiPEnj
 GtHDfoL6Of6uW5wCXTV/NcV8PuSCJdde43rFaixybF9QGGpepQnCjhXT7+Bi/ALr39SDcX4zq25AI
 WS+feCh5fSqQM/YYONYJpwS30/UOhPIIaIz3t3D2SN6Jh+QrmEPHR1m/Pwo8cdtnbRbc=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mMVyx-0002gS-Ek; Sat, 04 Sep 2021 15:45:22 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
 <86lf4dwxk8.fsf@HIDDEN> <874kb1wwru.fsf@HIDDEN>
 <86y28dd1r9.fsf@HIDDEN> <87zgssu9sl.fsf@HIDDEN>
 <86wnnwlbjm.fsf@HIDDEN>
Date: Sat, 04 Sep 2021 15:45:17 +0200
In-Reply-To: <86wnnwlbjm.fsf@HIDDEN> (Andy Moreton's message of "Sat, 04
 Sep 2021 14:23:25 +0100")
Message-ID: <875yvgqwsy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Andy Moreton <andrewjmoreton@HIDDEN> writes: > I think
 that the difference is whether the user sees it as describing > arguments
 to a function call,
 or forms in a control structure. The > "(when COND BODY...)"
 version also matches the style used [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27229
Cc: 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Andy Moreton <andrewjmoreton@HIDDEN> writes:

> I think that the difference is whether the user sees it as describing
> arguments to a function call, or forms in a control structure. The
> "(when COND BODY...)" version also matches the style used for `if'.
>
> Most of the other macros are intended to look like function calls to the
> user, not control structures.

Like...  `when-let'?

I think it pretty much looks like the (fn) in `when' (and `unless') is a
bug (it certainly trips up eldoc here, which would do the correct thing
if (fn) is removed).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Sep 2021 13:23:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 09:23:36 2021
Received: from localhost ([127.0.0.1]:46869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMVdw-0004Vw-7a
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 09:23:36 -0400
Received: from lists.gnu.org ([209.51.188.17]:44906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMVdv-0004Vq-IW
 for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 09:23:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51156)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMVdt-0001pa-Lj
 for bug-gnu-emacs@HIDDEN; Sat, 04 Sep 2021 09:23:35 -0400
Received: from ciao.gmane.io ([116.202.254.214]:46974)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMVds-00061Y-DB
 for bug-gnu-emacs@HIDDEN; Sat, 04 Sep 2021 09:23:33 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMVdq-00055U-JW
 for bug-gnu-emacs@HIDDEN; Sat, 04 Sep 2021 15:23:30 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
Date: Sat, 04 Sep 2021 14:23:25 +0100
Message-ID: <86wnnwlbjm.fsf@HIDDEN>
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
 <86lf4dwxk8.fsf@HIDDEN> <874kb1wwru.fsf@HIDDEN>
 <86y28dd1r9.fsf@HIDDEN> <87zgssu9sl.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
Cancel-Lock: sha1:/T3pSdiW/koxD+VN9Ep1gz704/M=
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 5
X-Spam_score: 0.5
X-Spam_bar: /
X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

On Sat 04 Sep 2021, Lars Ingebrigtsen wrote:

> Andy Moreton <andrewjmoreton@HIDDEN> writes:
>
>> Without using "fn", it is shown as "(when COND &rest BODY)" which is
>> less helpful than showing "(when COND BODY...)".
>
> What do you feel the semantic difference is between the two?  And why
> should `when' have this fn rewrite when we have hundreds of other
> macros with &rest body that don't have an fn?

I think that the difference is whether the user sees it as describing
arguments to a function call, or forms in a control structure. The
"(when COND BODY...)" version also matches the style used for `if'.

Most of the other macros are intended to look like function calls to the
user, not control structures.

    AndyM







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 4 Sep 2021 06:36:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 02:36:36 2021
Received: from localhost ([127.0.0.1]:46268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMPI4-00036L-JF
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 02:36:36 -0400
Received: from quimby.gnus.org ([95.216.78.240]:37796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mMPI2-000361-Tm
 for 27229 <at> debbugs.gnu.org; Sat, 04 Sep 2021 02:36:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=oFwo+AvJLeIkezDFNl66HqVf92JKN5uBEZ5XeuTeG9Y=; b=oNTG2/GdfMbj/aup4KQ+BeJw9Y
 dEJA5+RNH/9T5S/dc702lYgKay9WD0PJR0OBTe/w9uEZv/787iNlD3wt3eHP44/pTnlSRIiFc7tDh
 PUuE63NaiPcFFWaRK8mZOQ/96L6Kq31p2zsdP3gseJTwaLIA/vWd4ukcSW9sLOI9FRtI=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mMPHu-0006Es-HY; Sat, 04 Sep 2021 08:36:28 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
 <86lf4dwxk8.fsf@HIDDEN> <874kb1wwru.fsf@HIDDEN>
 <86y28dd1r9.fsf@HIDDEN>
Date: Sat, 04 Sep 2021 08:36:26 +0200
In-Reply-To: <86y28dd1r9.fsf@HIDDEN> (Andy Moreton's message of "Fri, 03
 Sep 2021 18:09:46 +0100")
Message-ID: <87zgssu9sl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Andy Moreton <andrewjmoreton@HIDDEN> writes: > Without
 using "fn", it is shown as "(when COND &rest BODY)" which is > less helpful
 than showing "(when COND BODY...)". What do you feel the semantic difference
 is between the two? And why should `when' have this fn rewrite when we have
 hundreds of other macros with &rest body that don't have an fn? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27229
Cc: 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Andy Moreton <andrewjmoreton@HIDDEN> writes:

> Without using "fn", it is shown as "(when COND &rest BODY)" which is
> less helpful than showing "(when COND BODY...)".

What do you feel the semantic difference is between the two?  And why
should `when' have this fn rewrite when we have hundreds of other
macros with &rest body that don't have an fn?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Sep 2021 17:09:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 13:09:59 2021
Received: from localhost ([127.0.0.1]:45868 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMChS-0001VG-UR
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 13:09:59 -0400
Received: from lists.gnu.org ([209.51.188.17]:60618)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMChR-0001V9-Do
 for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 13:09:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45280)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMChQ-0006d4-Ch
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 13:09:57 -0400
Received: from ciao.gmane.io ([116.202.254.214]:53672)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMChP-0004Kk-3m
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 13:09:56 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMChM-0006nv-86
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 19:09:52 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
Date: Fri, 03 Sep 2021 18:09:46 +0100
Message-ID: <86y28dd1r9.fsf@HIDDEN>
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
 <86lf4dwxk8.fsf@HIDDEN> <874kb1wwru.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
Cancel-Lock: sha1:ylncwLafGa+cQiLxOvxXy6Th4Ik=
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 5
X-Spam_score: 0.5
X-Spam_bar: /
X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

On Fri 03 Sep 2021, Lars Ingebrigtsen wrote:

> Andy Moreton <andrewjmoreton@HIDDEN> writes:
>
>>> Anybody know what the point of the (fn...) here is?
>>
>> Have a look at (info "(elisp) Function Documentation") which explains
>> this usage. Perhaps eldoc needs fixing to understand that idiom.
>
> I know what (fn ...) does.  I'm asking what's the point of it here,
> since the (fn ...) just seems to restate what's already the actual
> parameter list.

Without using "fn", it is shown as "(when COND &rest BODY)" which is
less helpful than showing "(when COND BODY...)".

    AndyM





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 3 Sep 2021 14:37:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 10:37:20 2021
Received: from localhost ([127.0.0.1]:45682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMAJk-0003zP-I6
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 10:37:20 -0400
Received: from quimby.gnus.org ([95.216.78.240]:59004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mMAJj-0003zD-Aj
 for 27229 <at> debbugs.gnu.org; Fri, 03 Sep 2021 10:37:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=VNoug/QE+ed9GbtWIKJk5znAEWLdSsSYabMJT3w0NGI=; b=ABsNXuUpiLf8RFkAuuv278n39w
 yB9L517GBeaaa7L1fa/nSHpbRnLPEYxycZqR9QFfNml/wq2lw3aPjwKRy5mUgY/Szs2/4ZYbkCEH4
 3Q4MG53jLT3XYm5jCsxwAbnRFSUL+SbG505LfAdQbVVKkqDBjum22TmfHB3G0LNJxhPU=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mMAJa-00060z-1D; Fri, 03 Sep 2021 16:37:12 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
 <86lf4dwxk8.fsf@HIDDEN>
Date: Fri, 03 Sep 2021 16:37:09 +0200
In-Reply-To: <86lf4dwxk8.fsf@HIDDEN> (Andy Moreton's message of "Fri, 03
 Sep 2021 15:20:07 +0100")
Message-ID: <874kb1wwru.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Andy Moreton <andrewjmoreton@HIDDEN> writes: >> Anybody
 know what the point of the (fn...) here is? > > Have a look at (info "(elisp)
 Function Documentation") which explains > this usage. Perhaps eldoc needs
 fixing to understand that idiom. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27229
Cc: 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Andy Moreton <andrewjmoreton@HIDDEN> writes:

>> Anybody know what the point of the (fn...) here is?
>
> Have a look at (info "(elisp) Function Documentation") which explains
> this usage. Perhaps eldoc needs fixing to understand that idiom.

I know what (fn ...) does.  I'm asking what's the point of it here,
since the (fn ...) just seems to restate what's already the actual
parameter list.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Sep 2021 14:20:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 10:20:28 2021
Received: from localhost ([127.0.0.1]:45660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMA3P-0003Vj-T6
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 10:20:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:49148)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMA3O-0003Vc-II
 for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 10:20:26 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33944)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMA3M-0007IQ-IM
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 10:20:26 -0400
Received: from ciao.gmane.io ([116.202.254.214]:44938)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMA3J-0003o2-DD
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 10:20:23 -0400
Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1mMA3D-0001jv-LN
 for bug-gnu-emacs@HIDDEN; Fri, 03 Sep 2021 16:20:15 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Andy Moreton <andrewjmoreton@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
Date: Fri, 03 Sep 2021 15:20:07 +0100
Message-ID: <86lf4dwxk8.fsf@HIDDEN>
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN> <87o89a12nc.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
Cancel-Lock: sha1:cOefVOz99serNbV4fglIzs32ga0=
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=geb-bug-gnu-emacs@HIDDEN; helo=ciao.gmane.io
X-Spam_score_int: 5
X-Spam_score: 0.5
X-Spam_bar: /
X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001,
 FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

On Fri 03 Sep 2021, Lars Ingebrigtsen wrote:

> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
>>> > From emacs -q, type "(when x y z": COND is highlighted
>>> > instead of BODY.  This is a regression from the behavior
>>> > of 24.5 (with eldoc-mode on).
>>>
>>> I can reproduce this on current master.
>>
>> Seems this code is the culprit (`elisp--highlight-function-argument'):
>>
>> | ;; Back to index 0 in ARG1 ARG2 ARG2 ARG3 etc...
>> | ;; like in `setq'.
>> | ((or (and (string-match-p "\\.\\.\\.\\'" argument)
>> |           (string= argument (car (last args-lst))))
>> |      (and (string-match-p "\\.\\.\\.\\'"
>> |                           (substring args 1 (1- (length args))))
>> |           (= (length (remove "..." args-lst)) 2)
>> |           (> index 1) (eq (logand index 1) 1)))
>> |  (setq index 0))
>>
>> In general, the problem is that "..." can have different meanings (it's
>> not clear which arguments have to be repeated), so this is not trivial
>> to fix I think.
>
> I wonder -- why is this defined like this, anyway?
>
> (defmacro when (cond &rest body)
>   "If COND yields non-nil, do BODY, else return nil.
> When COND yields non-nil, eval BODY forms sequentially and return
> value of last one, or nil if there are none.
>
> \(fn COND BODY...)"
>
> (when COND &rest BODY)
>
> is the correct signature, isn't it?  Removing the (fn ...) from the doc
> string makes eldoc do the correct thing.
>
> The commit message is helpful:
>
> commit 7f67eea000b0ba102dd86c2666041dc395137413
> Author:     Kim F. Storm <storm@HIDDEN>
> AuthorDate: Sun Mar 18 00:44:24 2007 +0000
>
>     (when, unless): Doc fix.
>
> Anybody know what the point of the (fn...) here is?

Have a look at (info "(elisp) Function Documentation") which explains
this usage. Perhaps eldoc needs fixing to understand that idiom.

    AndyM





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 3 Sep 2021 08:31:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 03 04:31:32 2021
Received: from localhost ([127.0.0.1]:42882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mM4bk-0008Rc-Nm
	for submit <at> debbugs.gnu.org; Fri, 03 Sep 2021 04:31:32 -0400
Received: from quimby.gnus.org ([95.216.78.240]:55030)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mM4bi-0008RJ-9x
 for 27229 <at> debbugs.gnu.org; Fri, 03 Sep 2021 04:31:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=1H/m8fukbl0FylxwmVVywmpIbsLQwgTmATPWvMhhltY=; b=gqApSph7gIDwG6XlxZLIjb1qNY
 iEHh8ssO+GqheREI7ia4ORtvxyUzhvaj9xqRQTCWbPtgVbAknGy9Ou8XSl7eT+IoHYLfGAOvafP2c
 w4WFJcCcUbRpMpXkyNpsif/HJ3h5uEXEgpvQSw35Wgtlj8UzgEmZvcJKyA3HEjdUyal8=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mM4bY-0000JB-EJ; Fri, 03 Sep 2021 10:31:23 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 <87k0w6dg58.fsf@HIDDEN>
Date: Fri, 03 Sep 2021 10:31:19 +0200
In-Reply-To: <87k0w6dg58.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 04
 Oct 2020 01:49:23 +0200")
Message-ID: <87o89a12nc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Michael Heerdegen <michael_heerdegen@HIDDEN> writes: >> >
 From emacs -q, type "(when x y z": COND is highlighted >> > instead of BODY.
 This is a regression from the behavior >> > of 24.5 (with eldoc-mode on).
 >> >> I can reproduce this on current master [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27229
Cc: "Charles A. Roelli" <charles@HIDDEN>, Stefan Kangas <stefan@HIDDEN>,
 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

>> > From emacs -q, type "(when x y z": COND is highlighted
>> > instead of BODY.  This is a regression from the behavior
>> > of 24.5 (with eldoc-mode on).
>>
>> I can reproduce this on current master.
>
> Seems this code is the culprit (`elisp--highlight-function-argument'):
>
> | ;; Back to index 0 in ARG1 ARG2 ARG2 ARG3 etc...
> | ;; like in `setq'.
> | ((or (and (string-match-p "\\.\\.\\.\\'" argument)
> |           (string= argument (car (last args-lst))))
> |      (and (string-match-p "\\.\\.\\.\\'"
> |                           (substring args 1 (1- (length args))))
> |           (= (length (remove "..." args-lst)) 2)
> |           (> index 1) (eq (logand index 1) 1)))
> |  (setq index 0))
>
> In general, the problem is that "..." can have different meanings (it's
> not clear which arguments have to be repeated), so this is not trivial
> to fix I think.

I wonder -- why is this defined like this, anyway?

(defmacro when (cond &rest body)
  "If COND yields non-nil, do BODY, else return nil.
When COND yields non-nil, eval BODY forms sequentially and return
value of last one, or nil if there are none.

\(fn COND BODY...)"

(when COND &rest BODY)

is the correct signature, isn't it?  Removing the (fn ...) from the doc
string makes eldoc do the correct thing.

The commit message is helpful:

commit 7f67eea000b0ba102dd86c2666041dc395137413
Author:     Kim F. Storm <storm@HIDDEN>
AuthorDate: Sun Mar 18 00:44:24 2007 +0000

    (when, unless): Doc fix.

Anybody know what the point of the (fn...) here is?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 3 Oct 2020 23:49:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 03 19:49:35 2020
Received: from localhost ([127.0.0.1]:44624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kOrHT-0002cg-0a
	for submit <at> debbugs.gnu.org; Sat, 03 Oct 2020 19:49:35 -0400
Received: from mout.web.de ([212.227.17.11]:56593)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1kOrHQ-0002cR-Rj
 for 27229 <at> debbugs.gnu.org; Sat, 03 Oct 2020 19:49:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1601768965;
 bh=P8nkIvByV0M8tO4QflP7n9AYoZtsdr5yWnyPgTBkph8=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=bZCZiSTThT/0GdjJyKqCETqW2vImLngpN1/PsEivyvuCTugIyO34GTRGvl0eS8Cig
 N9LB1bbdfRqVAEt7L8szpSSZHt1fzb/yJnxoEeX7KlQzYzUaZ6kas2GT+2Ya0We26K
 dlXvZ4d86YEB9F9yfFG8kJfQbcOc7YPfdySmgYjQ=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([94.218.220.78]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MSqXM-1jxzyN0jJW-00Umf8; Sun, 04
 Oct 2020 01:49:25 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Kangas <stefan@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
 <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
Date: Sun, 04 Oct 2020 01:49:23 +0200
In-Reply-To: <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
 (Stefan Kangas's message of "Sun, 16 Aug 2020 03:16:08 -0700")
Message-ID: <87k0w6dg58.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:eisLE2aDAF1/oOEvtmKF0IZDhRdUDf4ssQdI9hCuBzPcI3H5XvE
 ej3HFKg7OjF05gB3OotXFSFQthVaNT9UCefoV/vC0Mc6SUJZuPr6Zlq5ttkGTtxNXBFigUL
 0Hn5/hUbmN/b/gtVRx4zfNc2q37c1TKbxjjrrgemZ6m8afAyT5AmYBYhxu05IhXqmoWq0xs
 5kE58gFAVWLn06Tn3CsDg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:4VSpWy0RfrU=:CgHM6/Oi2qPXyeOuLN5Fxx
 +YjdSjgsuCzcKDTFZjctEXNv6/UXQ+8520EuyXRLqc/xxApoLd9llgD0K+dEB00U9T2YDfBtt
 Gsp3osoOWhwY5kvu/lpGMFqkrZa4f+9isdURNanVCx6ZiUnTB446t2udx5yvkPYI+tU932P9x
 FyhYN8A8YvRJWEx25qhm383E2X1PbLqW59nlmYvUUOFfi57L0mRtRzVhrYMuetg1lub6Y4T47
 2/8AJLU1dA7t2cuu4XlvQDAeeK+HhJXn1KwFR4hVJghKxS0XsA3YWB7le4TUjsoU6hF2zgqgz
 hEYhav5ktrJ+9EXIAIkWKDpC1GUqGgbBsmzecGNJ9cYK5OFvMeXkXFkKijLov5PQvnM9rzMbU
 aljgr9M1uWF5h8Y85v7xITOICEEsySy3CiZ9e6LzAIut6KE8gZ1n0tCIx4VsS84ETkhQNEm1t
 lyL1XjTeO+LwUPh2kO6MZKHlJvfnori4XdZlssHjOg1er1vszvCiK4LGtxhIMZT3y1ee0SiNv
 ufGAqFQC7t2xqO4F8anoLUylqXoswkHHO92Pp+Qs2Ypq22CLaxDxvsQ+7SFay/nRDougBI3VV
 Q4MAdEFzD1ct8RlNxfAiWk2jORunU8uqZgTy0knzwsQeMGymyvh1ZRith1RsFk4W+xdz6cr1k
 UqhgXkk2NQY8SdnwU6fTMdkPGbfN3j2ykE6LiqyFAFZgN3b2qlABLjzd6r354Ov2OddYi8Gv0
 g9HssiS8Mpys6aPbY5Mfho2eLJmPmLTybDMMpt1vVG+ap1gZv5MjWYwLNZiINT0ZHICLk8cBY
 brqmMFcBe86hw1wr5CzpOCOPa32IY7QGJFHxN5yAbUkIZhlZ4+bNcjcKaDwZ48pN4tNQ+UNc0
 +v3Lhmb1SxQtnEji+wgpU38mH+0Eh0M2vGQ/Y2e0WREJpDJIRKP/U2LyFjzLBwP6gKb9edwyb
 yAkKl98kKjuXv0zTNg/m6SMW4T/Xfxf191J+iOk006HQcYWZr2cyAPfUHcA+K7lgRtZe1XnPz
 tgMNralG0PX2fZkSXy451JYA/PtX+s1+Gm+j1PPs+f3UyAkzzOo4GnarN/n0d/i8ZH3fZV60y
 dJ560zHANXbTECuA689gCskdZF7+tDWvuiNkJ+pyQkKjBMZVqgCIUswXdqeJ2y0AkqW92rjiX
 /SJ+rSciFCrhexZHgu+ZlBtKAUFvNzBi5rne4LtmE9YCGU7yllUcq0zhblbvEeHsnPt82hT9f
 EEr6xWD/HQWllhC/MLv+N+gookg1Yk9UavahPmw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27229
Cc: "Charles A. Roelli" <charles@HIDDEN>, 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Kangas <stefan@HIDDEN> writes:

> "Charles A. Roelli" <charles@HIDDEN> writes:
>
> > From emacs -q, type "(when x y z": COND is highlighted
> > instead of BODY.  This is a regression from the behavior
> > of 24.5 (with eldoc-mode on).
>
> I can reproduce this on current master.

Seems this code is the culprit (`elisp--highlight-function-argument'):

| ;; Back to index 0 in ARG1 ARG2 ARG2 ARG3 etc...
| ;; like in `setq'.
| ((or (and (string-match-p "\\.\\.\\.\\'" argument)
|           (string= argument (car (last args-lst))))
|      (and (string-match-p "\\.\\.\\.\\'"
|                           (substring args 1 (1- (length args))))
|           (= (length (remove "..." args-lst)) 2)
|           (> index 1) (eq (logand index 1) 1)))
|  (setq index 0))

In general, the problem is that "..." can have different meanings (it's
not clear which arguments have to be repeated), so this is not trivial
to fix I think.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.
bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 16 Aug 2020 10:16:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 16 06:16:18 2020
Received: from localhost ([127.0.0.1]:56895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k7Fi5-0007is-Un
	for submit <at> debbugs.gnu.org; Sun, 16 Aug 2020 06:16:18 -0400
Received: from mail-yb1-f180.google.com ([209.85.219.180]:33053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1k7Fi1-0007iK-Vt
 for 27229 <at> debbugs.gnu.org; Sun, 16 Aug 2020 06:16:15 -0400
Received: by mail-yb1-f180.google.com with SMTP id p191so7784352ybg.0
 for <27229 <at> debbugs.gnu.org>; Sun, 16 Aug 2020 03:16:13 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:in-reply-to:references:user-agent
 :mime-version:date:message-id:subject:to:cc;
 bh=wpO7mdiqrPExNlBOg/XJiy0VexRwtab7heBqyJnZhcY=;
 b=bgtXd8yNXaSz/S4+X16ki4dnNhxo78OvruBqgI0NzfMJVGlMW/8iozEozn/zJd4r7P
 iGwXbCUd9C3RKCArBtchF9UG2fGizp9+hPZdIxbY8NANZNA6tJF3ZUbE/AZtTXWzK3wV
 WisKq2hrTc3+FuRR5SB5NRHykLq8reXZhIch9ifgjwlpfqg5kjtbY5OY76JJ7dRa+vdb
 oIjZoXY5OLNpRh/BPrCSd2dNviRZ919yUQmpXZtfIfaHmfUXn9SsEZ45a8Cxq0ep1wSM
 QBhpH4vm0q4QLg2sEMJin9WvfTlX8YLPOtefCQQlVscy+e5gtsF1M/V6tZ7Doby/8vNY
 FJhg==
X-Gm-Message-State: AOAM531eBXj+avbJHxEqiwz3HrLWfmOoj59iFON5uRfGdOoGUSVpE4K0
 h+X4L249jXhitO69gW+rjP8qLk41VVmPkyxtJEQ=
X-Google-Smtp-Source: ABdhPJzWyFf9ZJarubD53Ewo6uTL/rg/QACi6quca7KjRFtEtm5Sh6VDgoS99O8LPhDKA24yE2UZ9XnxwXGdH/NeOx8=
X-Received: by 2002:a25:4ed7:: with SMTP id
 c206mr14670345ybb.129.1597572968642; 
 Sun, 16 Aug 2020 03:16:08 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 16 Aug 2020 03:16:08 -0700
From: Stefan Kangas <stefan@HIDDEN>
In-Reply-To: <oh0mq8$gio$1@HIDDEN> (Charles A. Roelli's message of
 "Sun, 4 Jun 2017 12:18:54 +0200")
References: <oh0mq8$gio$1@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Date: Sun, 16 Aug 2020 03:16:08 -0700
Message-ID: <CADwFkmnJtrGvWYzymYwqkfB19X=1i-ODjNT6+7rymweuMAN2nQ@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
To: "Charles A. Roelli" <charles@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 27229
Cc: 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

found 27229 28.0.50
tags 27229 + confirmed
thanks

"Charles A. Roelli" <charles@HIDDEN> writes:

> From emacs -q, type "(when x y z": COND is highlighted
> instead of BODY.  This is a regression from the behavior
> of 24.5 (with eldoc-mode on).

I can reproduce this on current master.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.
Added tag(s) confirmed. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
bug Marked as found in versions 25.2. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27229 <at> debbugs.gnu.org:


Received: (at 27229) by debbugs.gnu.org; 4 Jun 2017 15:58:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 04 11:58:24 2017
Received: from localhost ([127.0.0.1]:55980 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dHXv6-00059w-BB
	for submit <at> debbugs.gnu.org; Sun, 04 Jun 2017 11:58:24 -0400
Received: from gateway-a.fh-trier.de ([143.93.54.181]:54911)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <politza@HIDDEN>) id 1dHXv4-00059f-Kk
 for 27229 <at> debbugs.gnu.org; Sun, 04 Jun 2017 11:58:23 -0400
X-Virus-Scanned: by Amavisd-new + Sophos + ClamAV [Rechenzentrum Hochschule
 Trier (RZ/HT)]
Received: from localhost (ip4d15f86e.dynamic.kabel-deutschland.de
 [77.21.248.110]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested) (Authenticated sender: politza)
 by gateway-a.fh-trier.de (Postfix) with ESMTPSA id A148F179E9D5;
 Sun,  4 Jun 2017 17:58:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de;
 s=default; t=1496591896; bh=P5KsnHOx6hz8yA09gHdvhmJrFag=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:
 MIME-Version:Content-Type;
 b=JPQR/BNO245xNzW39D8UoQluN8p4FXrlzSpquqgkBvZIzajr3Ruj64VxzNHbBGc+v
 UspVW9sBN6xbdb1xHHQfh7nTEZxGKIilOFQE2hauCfcGEMu6VW8w6BKVIoghOEMmFa
 T8aRmluVbdwTiVIH7y4jShE/9G1wXipPtSC/gyyc=
From: Andreas Politz <politza@HIDDEN>
To: "Charles A. Roelli" <charles@HIDDEN>
Subject: Re: bug#27229: eldoc wrong highlighting for "when"
References: <oh0mq8$gio$1@HIDDEN>
Date: Sun, 04 Jun 2017 17:58:16 +0200
In-Reply-To: <oh0mq8$gio$1@HIDDEN> (Charles A. Roelli's message of
 "Sun, 4 Jun 2017 12:18:54 +0200")
Message-ID: <878tl77njb.fsf@luca>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 27229
Cc: 27229 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


In Emacs 24.5 this highlighting was done in the function
eldoc-highlight-function-argument, which since then has been moved to
elisp--highlight-function-argument and was also heavily extended.

From reading the new code, it seems to interpret doc-strings of the kind
"(FN ARG0 ARG1...)", as being a macro with alternating forms, e.g. like
setq.  While previously, I think, they were constantly treated as a "(FN
ARG BODY..)" type.

-ap









Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jun 2017 10:20:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 04 06:20:27 2017
Received: from localhost ([127.0.0.1]:54622 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dHSe3-0006Y2-Ms
	for submit <at> debbugs.gnu.org; Sun, 04 Jun 2017 06:20:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36546)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1dHSe0-0006Xo-GI
 for submit <at> debbugs.gnu.org; Sun, 04 Jun 2017 06:20:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1dHSdu-0006fS-G3
 for submit <at> debbugs.gnu.org; Sun, 04 Jun 2017 06:20:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58203)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1dHSdu-0006fH-D3
 for submit <at> debbugs.gnu.org; Sun, 04 Jun 2017 06:20:18 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55745)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1dHSdt-0007Wf-Es
 for bug-gnu-emacs@HIDDEN; Sun, 04 Jun 2017 06:20:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1dHSdq-0006b8-CO
 for bug-gnu-emacs@HIDDEN; Sun, 04 Jun 2017 06:20:17 -0400
Received: from [195.159.176.226] (port=34949 helo=blaine.gmane.org)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1dHSdq-0006aa-6O
 for bug-gnu-emacs@HIDDEN; Sun, 04 Jun 2017 06:20:14 -0400
Received: from list by blaine.gmane.org with local (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1dHSdh-00009H-ER
 for bug-gnu-emacs@HIDDEN; Sun, 04 Jun 2017 12:20:05 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: "Charles A. Roelli" <charles@HIDDEN>
Subject: eldoc wrong highlighting for "when"
Date: Sun, 4 Jun 2017 12:18:54 +0200
Lines: 3
Message-ID: <oh0mq8$gio$1@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@HIDDEN
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0)
 Gecko/20100101 Thunderbird/45.8.0
X-Mozilla-News-Host: news://news.gmane.org:119
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

 From emacs -q, type "(when x y z": COND is highlighted
instead of BODY.  This is a regression from the behavior
of 24.5 (with eldoc-mode on).





Acknowledgement sent to "Charles A. Roelli" <charles@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27229; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 3 Oct 2021 10:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.