GNU bug report logs -
#24543
25.1; describe-symbol doesn't show face with same name as a variable
Previous Next
Reported by: Alex <agrambot <at> gmail.com>
Date: Sun, 25 Sep 2016 18:50:02 UTC
Severity: normal
Found in version 25.1
Done: Eli Zaretskii <eliz <at> gnu.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 24543 in the body.
You can then email your comments to 24543 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#24543
; Package
emacs
.
(Sun, 25 Sep 2016 18:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alex <agrambot <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 25 Sep 2016 18:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Recipe:
emacs -Q
C-h o font-lock-comment-face RET
Only the variable of this name is shown, not the face (which can be
viewed with describe-face, of course).
It appears that when the face only shares a name with a function, then
both the function and face are shown. Only a variable shadows the face
in describe-symbol.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24543
; Package
emacs
.
(Fri, 16 Jun 2017 21:55:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 24543 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Alex <agrambot <at> gmail.com> writes:
> Recipe:
>
> emacs -Q
> C-h o font-lock-comment-face RET
>
> Only the variable of this name is shown, not the face (which can be
> viewed with describe-face, of course).
>
> It appears that when the face only shares a name with a function, then
> both the function and face are shown. Only a variable shadows the face
> in describe-symbol.
This is because describe-symbol isn't returning (buffer-string) like
describe-{function, variable} are.
I've attached a patch fixing this problem.
Additionally, I have attached another patch that re-orders the placement
of variables/faces in describe-symbol, to put more emphasis on the
variable entry rather than the face.
[0001-Properly-show-faces-in-describe-symbol-Bug-24543.patch (text/x-diff, attachment)]
[0002-lisp-help-mode.el-describe-symbol-backends-Reorder-e.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24543
; Package
emacs
.
(Wed, 26 Jul 2017 04:29:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 24543 <at> debbugs.gnu.org (full text, mbox):
Alex <agrambot <at> gmail.com> writes:
> Alex <agrambot <at> gmail.com> writes:
>
>> Recipe:
>>
>> emacs -Q
>> C-h o font-lock-comment-face RET
>>
>> Only the variable of this name is shown, not the face (which can be
>> viewed with describe-face, of course).
>>
>> It appears that when the face only shares a name with a function, then
>> both the function and face are shown. Only a variable shadows the face
>> in describe-symbol.
>
> This is because describe-symbol isn't returning (buffer-string) like
> describe-{function, variable} are.
>
> I've attached a patch fixing this problem.
>
> Additionally, I have attached another patch that re-orders the placement
> of variables/faces in describe-symbol, to put more emphasis on the
> variable entry rather than the face.
Ping. Eli?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24543
; Package
emacs
.
(Wed, 26 Jul 2017 14:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24543 <at> debbugs.gnu.org (full text, mbox):
> From: Alex <agrambot <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> Date: Tue, 25 Jul 2017 22:28:05 -0600
>
> Ping. Eli?
Sorry, I hoped someone more knowledgeable about this stiff will beat
me to it.
I will review this in a couple of days.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24543
; Package
emacs
.
(Fri, 28 Jul 2017 07:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24543 <at> debbugs.gnu.org (full text, mbox):
> From: Alex <agrambot <at> gmail.com>
> Date: Fri, 16 Jun 2017 15:54:45 -0600
>
> > emacs -Q
> > C-h o font-lock-comment-face RET
> >
> > Only the variable of this name is shown, not the face (which can be
> > viewed with describe-face, of course).
> >
> > It appears that when the face only shares a name with a function, then
> > both the function and face are shown. Only a variable shadows the face
> > in describe-symbol.
>
> This is because describe-symbol isn't returning (buffer-string) like
> describe-{function, variable} are.
>
> I've attached a patch fixing this problem.
Thanks. This LGTM, but doesn't the fact that describe-face's return
value will change after this constitute an incompatible change? And
if so, could it break some of the users of this function out there?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24543
; Package
emacs
.
(Fri, 28 Jul 2017 20:46:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 24543 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Alex <agrambot <at> gmail.com>
>> Date: Fri, 16 Jun 2017 15:54:45 -0600
>>
>> > emacs -Q
>> > C-h o font-lock-comment-face RET
>> >
>> > Only the variable of this name is shown, not the face (which can be
>> > viewed with describe-face, of course).
>> >
>> > It appears that when the face only shares a name with a function, then
>> > both the function and face are shown. Only a variable shadows the face
>> > in describe-symbol.
>>
>> This is because describe-symbol isn't returning (buffer-string) like
>> describe-{function, variable} are.
>>
>> I've attached a patch fixing this problem.
>
> Thanks. This LGTM, but doesn't the fact that describe-face's return
> value will change after this constitute an incompatible change? And
I suppose so; would it be expected to be documented in NEWS?
> if so, could it break some of the users of this function out there?
Potentially, but I don't see that being an issue in this case. The
return value isn't documented, so users shouldn't be (and likely aren't)
relying on describe-face always returning nil. It makes more sense to
treat describe-face like describe-{function, variable}.
Though I'm not sure why those two procedures return (buffer-string) in
the first place. In any case, I figure it's better to leave those and
describe-symbol alone and just make describe-face behave similarly.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 05 Aug 2017 08:54:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alex <agrambot <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 05 Aug 2017 08:54:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 24543-done <at> debbugs.gnu.org (full text, mbox):
> From: Alex <agrambot <at> gmail.com>
> Cc: 24543 <at> debbugs.gnu.org
> Date: Fri, 28 Jul 2017 14:45:24 -0600
>
> > if so, could it break some of the users of this function out there?
>
> Potentially, but I don't see that being an issue in this case. The
> return value isn't documented, so users shouldn't be (and likely aren't)
> relying on describe-face always returning nil. It makes more sense to
> treat describe-face like describe-{function, variable}.
OK, I pushed the changes.
Thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 02 Sep 2017 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.