GNU bug report logs - #24543
25.1; describe-symbol doesn't show face with same name as a variable

Previous Next

Package: emacs;

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.

Full log


Message #20 received at 24543 <at> debbugs.gnu.org (full text, mbox):

From: Alex <agrambot <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24543 <at> debbugs.gnu.org
Subject: Re: bug#24543: 25.1;
 describe-symbol doesn't show face with same name as a variable
Date: Fri, 28 Jul 2017 14:45:24 -0600
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.




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.