From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#30230: 27.0.50; find-face-definition wrong result for default face Date: Tue, 17 Apr 2018 22:13:06 +0200 Message-ID: <87wox5h9rh.fsf@mouse.gnus.org> References: <87efmgzrmt.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523995928 21962 195.159.176.226 (17 Apr 2018 20:12:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Apr 2018 20:12:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 30230@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 17 22:12:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8WxO-0005dJ-T2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Apr 2018 22:12:03 +0200 Original-Received: from localhost ([::1]:60300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8WzV-0002BV-Ir for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Apr 2018 16:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8WzO-0002Af-0e for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 16:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8WzK-0002Cs-N1 for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 16:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50043) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8WzK-00028k-GE for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 16:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8WzJ-0006oq-Uf for bug-gnu-emacs@gnu.org; Tue, 17 Apr 2018 16:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Apr 2018 20:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30230 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 30230-submit@debbugs.gnu.org id=B30230.152399599726155 (code B ref 30230); Tue, 17 Apr 2018 20:14:01 +0000 Original-Received: (at 30230) by debbugs.gnu.org; 17 Apr 2018 20:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:57940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8Wya-0006nn-Um for submit@debbugs.gnu.org; Tue, 17 Apr 2018 16:13:17 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:38393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8WyZ-0006nf-4b for 30230@debbugs.gnu.org; Tue, 17 Apr 2018 16:13:15 -0400 Original-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 ) id 1f8WyW-0000yB-8C; Tue, 17 Apr 2018 22:13:14 +0200 Original-Received: from larsi by corrigan with local (Exim 4.89) (envelope-from ) id 1f8WyQ-0002gb-Al; Tue, 17 Apr 2018 22:13:06 +0200 In-Reply-To: <87efmgzrmt.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 23 Jan 2018 12:28:10 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145518 Archived-At: "Basil L. Contovounesios" 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