all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nicolas Martyanoff <nicolas@n16f.net>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp
Date: Thu, 02 Feb 2023 20:13:38 +0200	[thread overview]
Message-ID: <83ilgkvstp.fsf@gnu.org> (raw)
In-Reply-To: <87y1pgpau5.fsf@valhala.localdomain> (message from Nicolas Martyanoff on Thu, 02 Feb 2023 12:26:26 +0100)

> 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.



      parent reply	other threads:[~2023-02-02 18:13 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
     [not found]   ` <87y1pgpau5.fsf@valhala.localdomain>
2023-02-02 18:13     ` Eli Zaretskii [this message]

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=83ilgkvstp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=nicolas@n16f.net \
    /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.