From: Nicolas Martyanoff <nicolas@n16f.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Nicolas Martyanoff <nicolas@n16f.net>, emacs-devel@gnu.org
Subject: Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp
Date: Thu, 02 Feb 2023 12:27:20 +0100 [thread overview]
Message-ID: <87r0v8pasn.fsf@valhala.localdomain> (raw)
In-Reply-To: <83cz6sxs2w.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Feb 2023 12:46:47 +0200")
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
next prev parent reply other threads:[~2023-02-02 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 0:54 [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp Nicolas Martyanoff
2023-02-02 10:46 ` Eli Zaretskii
2023-02-02 11:27 ` Nicolas Martyanoff [this message]
[not found] ` <87y1pgpau5.fsf@valhala.localdomain>
2023-02-02 18:13 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0v8pasn.fsf@valhala.localdomain \
--to=nicolas@n16f.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.