GNU bug report logs -
#30230
27.0.50; find-face-definition wrong result for default face
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Tue, 23 Jan 2018 12:29:02 UTC
Severity: minor
Tags: confirmed
Found in version 27.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30230 in the body.
You can then email your comments to 30230 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30230
; Package
emacs
.
(Tue, 23 Jan 2018 12:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Basil L. Contovounesios" <contovob <at> tcd.ie>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 23 Jan 2018 12:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)
Added tag(s) confirmed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 17 Apr 2018 20:12:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30230
; Package
emacs
.
(Tue, 17 Apr 2018 20:14:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 30230 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> 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 <at> gnu.org
:
bug#30230
; Package
emacs
.
(Fri, 25 Jun 2021 15:18:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 30230 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> 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.
I've now done this in Emacs 28 for defface. An even more general
solution would be to change `find-function-search-for-symbol' to ignore
all matches that are inside comments or strings, but I didn't feel
familiar enough with all the use cases here to do that.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
30230 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 25 Jun 2021 15:18:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Jul 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.