[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common
From: |
Nicolas Martyanoff |
Subject: |
Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp |
Date: |
Thu, 02 Feb 2023 12:27:20 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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.
Regards,
--
Nicolas Martyanoff
https://n16f.net
nicolas@n16f.net