GNU bug report logs - #30230
27.0.50; find-face-definition wrong result for default face

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: "Basil L. Contovounesios" <contovob@HIDDEN>; Keywords: confirmed; dated Tue, 23 Jan 2018 12:29:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 30230) by debbugs.gnu.org; 17 Apr 2018 20:13:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 17 16:13:17 2018
Received: from localhost ([127.0.0.1]:57940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f8Wya-0006nn-Um
	for submit <at> debbugs.gnu.org; Tue, 17 Apr 2018 16:13:17 -0400
Received: from hermes.netfonds.no ([80.91.224.195]:38393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1f8WyZ-0006nf-4b
 for 30230 <at> debbugs.gnu.org; Tue, 17 Apr 2018 16:13:15 -0400
Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan)
 by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <larsi@HIDDEN>)
 id 1f8WyW-0000yB-8C; Tue, 17 Apr 2018 22:13:14 +0200
Received: from larsi by corrigan with local (Exim 4.89)
 (envelope-from <larsi@HIDDEN>)
 id 1f8WyQ-0002gb-Al; Tue, 17 Apr 2018 22:13:06 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Subject: Re: bug#30230: 27.0.50;
 find-face-definition wrong result for default face
References: <87efmgzrmt.fsf@HIDDEN>
Date: Tue, 17 Apr 2018 22:13:06 +0200
In-Reply-To: <87efmgzrmt.fsf@HIDDEN> (Basil L. Contovounesios's message of
 "Tue, 23 Jan 2018 12:28:10 +0000")
Message-ID: <87wox5h9rh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30230
Cc: 30230 <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.0 (-)

"Basil L. Contovounesios" <contovob@HIDDEN> writes:

> Steps to reproduce:
>
> 1. emacs -Q
> 2. M-x find-face-definition RET default RET
>
> Expected result: point at definition of default defface in
> lisp/faces.el.
>
> Actual result: point in docstring of face-spec-recalc defun in
> lisp/faces.el

Yup.

> Some solution suggestions, in order of increasing complexity:
>
> 1. Reword aforementioned docstring to make it look less like a defface,
>    e.g. by replacing parens with brackets.
>
> 2. Replace find-face-regexp in find-function-regexp-alist with a
>    function which repeats the find-face-regexp search until point is
>    actually at a defface.

At least it could look around and see whether it's in a doc string or a
comment, and not return the definition if it's there, I would have
thought?  And without looking at the code, I would imagine that that
shouldn't be very difficult.

> Let me know what you think and whether you would like me to provide a
> patch.

Yes, please patches.  :-)

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




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

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


Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 12:28:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 07:28:36 2018
Received: from localhost ([127.0.0.1]:39132 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1edxgp-0001iW-Pb
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 07:28:35 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43228)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1edxgo-0001iI-K9
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 07:28:34 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <contovob@HIDDEN>) id 1edxge-000770-Ku
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 07:28:29 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59802)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <contovob@HIDDEN>) id 1edxge-00076w-Hr
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 07:28:24 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34182)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <contovob@HIDDEN>) id 1edxgd-0005SN-DY
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 07:28:24 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <contovob@HIDDEN>) id 1edxgZ-00074Y-Dn
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 07:28:23 -0500
Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:45666)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <contovob@HIDDEN>) id 1edxgZ-00073t-5w
 for bug-gnu-emacs@HIDDEN; Tue, 23 Jan 2018 07:28:19 -0500
Received: by mail-wm0-x22d.google.com with SMTP id i186so1469335wmi.4
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Jan 2018 04:28:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=tcd-ie.20150623.gappssmtp.com; s=20150623;
 h=from:to:subject:date:message-id:mime-version;
 bh=My/sg8z6Wva95vrsSMvHqsSn0VJ8eDEuXT4LlTfHTys=;
 b=MY607wCEKUKN3Dgc58RjhTDbXfWDfMkMTVIS6xGLZuqvoWbQTNOsUZ8cX6WsszLLTI
 SPcckdvt65D9+rr5BN/T9chIgWRdgzDMcVJm8clVwxgsgYveoUv6PidG9CdbPI1vJjMF
 XJRiMr9bRmf/q9VjwppfD4zai8un+Qd0wJUivJkfyVRZHDRz65HNjaA528G2dsIHezQs
 YKF7YpJWgQFtsgYY78t9aG1aaDUQ/X5a8Vtx5kLLBXJEjOM0IfN0gN7O1DTM+B4Qvebm
 OSJVoagcxcs/giTGw8Y6sOtvKNqY5aG0bmG8j1UizQ2NwlZBEcQOi3D6juyZK2gpX5UZ
 Ahmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=My/sg8z6Wva95vrsSMvHqsSn0VJ8eDEuXT4LlTfHTys=;
 b=onTI3Eu0kGLyiapqXng4tJo1x0FmrVIHBDHJamETpLy2JQdEJ9Wgfe6ggscAYMsqZL
 e0Fg6EMciwDu4IsfROMWs5NU/RA4U1V15Ql+BTySI3fYj6x+mP9Na3S+xD9zBLmuUMKo
 WWliU5OweNODNMEcIxKzWlAoD26OvttXGumgRZP5NRXej0wcLpLeH2KStUFa5TynUNOY
 HwCjcYMmuI+rSy1aqdSYwf3LpjPMUIzQ30OUBO9BkFOwGZe9LKBB+PkE3k+hc9l+2OpP
 V8OGcEVzJ4Eeql4iLFDXvb/o1LGq8VZV6vjDzA9F+UP+HqLRnaZoWAdTk3EIKGTeqs61
 KYmw==
X-Gm-Message-State: AKwxytcPfVJC6V4Iw5EFv1Eq5efFHSH0Kr8J0WipCBmyzLgdE6CXkFxD
 BmAwv3WeNTJieJA92znWjREpxooj
X-Google-Smtp-Source: AH8x225KJrDmRjjY+njGjXzAnxUFQrJXJmSV7mgup1J5y+igg2HntdyPFHef1ycSaZuYJ8SjkHSkDA==
X-Received: by 10.80.135.205 with SMTP id 13mr19589984edz.253.1516710497377;
 Tue, 23 Jan 2018 04:28:17 -0800 (PST)
Received: from localhost ([213.233.149.30])
 by smtp.gmail.com with ESMTPSA id s23sm7671977edm.15.2018.01.23.04.28.15
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 23 Jan 2018 04:28:16 -0800 (PST)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; find-face-definition wrong result for default face
Date: Tue, 23 Jan 2018 12:28:10 +0000
Message-ID: <87efmgzrmt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
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 (-----)

Steps to reproduce:

1. emacs -Q
2. M-x find-face-definition RET default RET

Expected result: point at definition of default defface in
lisp/faces.el.

Actual result: point in docstring of face-spec-recalc defun in
lisp/faces.el

Some solution suggestions, in order of increasing complexity:

1. Reword aforementioned docstring to make it look less like a defface,
   e.g. by replacing parens with brackets.

2. Replace find-face-regexp in find-function-regexp-alist with a
   function which repeats the find-face-regexp search until point is
   actually at a defface.

3. ?

If option (2) is entertained, I wonder if this approach should be
generalised to all regexp searches, i.e. including those for defuns,
defvars, etc.

Let me know what you think and whether you would like me to provide a
patch.

Thanks,

-- 
Basil

In GNU Emacs 27.0.50 (build 25, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-01-22 built on thunk
Repository revision: c42959cc206bcb52baffd45f892da1b767f0f8c1
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Debian GNU/Linux testing (buster)




Acknowledgement sent to "Basil L. Contovounesios" <contovob@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#30230; 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: Tue, 17 Apr 2018 20:15:02 UTC

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