GNU bug report logs - #60348
30.0.50; Incorrect docstring face in lisp-mode

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Tue, 27 Dec 2022 03:49:01 UTC

Severity: normal

Tags: notabug

Found in version 30.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 60348 in the body.
You can then email your comments to 60348 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60348; Package emacs. (Tue, 27 Dec 2022 03:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel <gabriel376 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 27 Dec 2022 03:49:02 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Incorrect docstring face in lisp-mode
Date: Tue, 27 Dec 2022 00:42:37 -0300
Steps:

1) emacs -Q (master branch)

2) Open *scratch* buffer (or any buffer with a lisp major mode)

3) Type:

(defun foo () "Hello, World!")

Expected result: The string "Hello, World!" is fontified with
'font-lock-string-face'.

Actual result: The string "Hello, World!" is fontified with
'font-lock-doc-face'.

---
Gabriel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60348; Package emacs. (Tue, 27 Dec 2022 12:23:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gabriel <gabriel376 <at> hotmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 60348 <at> debbugs.gnu.org
Subject: Re: bug#60348: 30.0.50; Incorrect docstring face in lisp-mode
Date: Tue, 27 Dec 2022 14:22:02 +0200
> From: Gabriel <gabriel376 <at> hotmail.com>
> Date: Tue, 27 Dec 2022 00:42:37 -0300
> 
> Steps:
> 
> 1) emacs -Q (master branch)
> 
> 2) Open *scratch* buffer (or any buffer with a lisp major mode)
> 
> 3) Type:
> 
> (defun foo () "Hello, World!")
> 
> Expected result: The string "Hello, World!" is fontified with
> 'font-lock-string-face'.
> 
> Actual result: The string "Hello, World!" is fontified with
> 'font-lock-doc-face'.

I'm not sure I understand why you expected something other than
font-lock-doc-face.  E.g., the Lisp interpreter disagrees with you:

  (documentation 'foo)
    => "Hello, World!"

Am I missing something here?




Added tag(s) notabug. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 27 Dec 2022 13:01:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60348; Package emacs. (Tue, 27 Dec 2022 21:25:03 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#60348: 30.0.50; Incorrect docstring face in lisp-mode
Date: Tue, 27 Dec 2022 18:24:43 -0300
Eli Zaretskii <eliz <at> gnu.org> writes:
>
> I'm not sure I understand why you expected something other than
> font-lock-doc-face.  E.g., the Lisp interpreter disagrees with you:
>
>   (documentation 'foo)
>     => "Hello, World!"
>
> Am I missing something here?

Hi Eli,

Well, I am not sure either, but for me it's sort of confusing.  If you
eval:

  (foo)
  => "Hello, World!"

How does the Lisp interpreter handles this case?  It's a docstring AND a
function body?

---
Gabriel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60348; Package emacs. (Sun, 03 Sep 2023 10:40:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gabriel <gabriel376 <at> hotmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 60348 <at> debbugs.gnu.org
Subject: Re: bug#60348: 30.0.50; Incorrect docstring face in lisp-mode
Date: Sun, 3 Sep 2023 03:39:22 -0700
tags 60348 notabug
close 60348
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gabriel <gabriel376 <at> hotmail.com>
>> Date: Tue, 27 Dec 2022 00:42:37 -0300
>>
>> Steps:
>>
>> 1) emacs -Q (master branch)
>>
>> 2) Open *scratch* buffer (or any buffer with a lisp major mode)
>>
>> 3) Type:
>>
>> (defun foo () "Hello, World!")
>>
>> Expected result: The string "Hello, World!" is fontified with
>> 'font-lock-string-face'.
>>
>> Actual result: The string "Hello, World!" is fontified with
>> 'font-lock-doc-face'.
>
> I'm not sure I understand why you expected something other than
> font-lock-doc-face.  E.g., the Lisp interpreter disagrees with you:
>
>   (documentation 'foo)
>     => "Hello, World!"
>
> Am I missing something here?

I think you're not missing anything.  This is the expected behavior, and
this is not a bug.

I'm therefore closing this bug report.




bug closed, send any further explanations to 60348 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com> Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 03 Sep 2023 10:40:03 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. (Sun, 01 Oct 2023 11:24:19 GMT) Full text and rfc822 format available.

This bug report was last modified 205 days ago.

Previous Next


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