emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common


From: Eli Zaretskii
Subject: Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp
Date: Thu, 02 Feb 2023 20:13:38 +0200

> From: Nicolas Martyanoff <nicolas@n16f.net>
> Date: Thu, 02 Feb 2023 12:26:26 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Nicolas Martyanoff <nicolas@n16f.net>
> >> Cc: Nicolas Martyanoff <nicolas@n16f.net>
> >> Date: Tue, 31 Jan 2023 01:54:57 +0100
> >> 
> >> In Common Lisp, defstruct accepts a docstring in second position. Having 
> >> the
> >> docstring identified as such allows correct highlighting.
> >
> > Do you mean cl-defstruct?  If not, what do you mean?
> >
> > Can you show a small Lisp recipe to demonstrate the differences in
> > highlighting before and after the change?
> 
> I do mean in Common Lisp.
> 
> To reproduce the issue (tested on Emacs 28.2 with "emacs -q"):
> 
> - Create a test.lisp buffer. It will use `lisp-mode' (the Common Lisp
>   "variant", not sure about the right terminology).
> 
> - Declare a structure:
>   (defstruct point "A 2d point." x y)
> 
> - Check that the face used for the docstring is (incorrectly)
>   `font-lock-string-face'.
> 
> - Update the doc-string-elt property for 'defstruct to indicate that the
>   second argument is the docstring, and reset highlighting
>   M-: (put 'defstruct 'doc-string-elt 2)
>   M-x common-lisp-mode
> 
> - Check that the face used for the docstring is now `font-lock-doc-face'
>   as it should be.

Thanks, installed on the emacs-29 branch.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]