From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] lisp-mode: fix defstruct docstring identification for Common Lisp Date: Thu, 02 Feb 2023 20:13:38 +0200 Message-ID: <83ilgkvstp.fsf@gnu.org> References: <20230131005457.162562-1-nicolas@n16f.net> <83cz6sxs2w.fsf@gnu.org> <87y1pgpau5.fsf@valhala.localdomain> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36499"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Nicolas Martyanoff Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 02 19:14:22 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pNe6I-0009KX-Qm for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Feb 2023 19:14:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNe5b-0003dc-6y; Thu, 02 Feb 2023 13:13:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNe5Z-0003d8-28 for emacs-devel@gnu.org; Thu, 02 Feb 2023 13:13:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNe5Y-0002rG-KL; Thu, 02 Feb 2023 13:13:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7EDeva5jfSob8ySXoUWpKi9fAqhcaUeSEooPgPr7+bQ=; b=f87EgC0rPYIw e3CbiiQpWvlXEIpgpxnzMQSPHliABtserwdvzNmsVEkRubs2R3xpvAN3v8JHmomwqEHbmNAwRNCn5 ppGfYzBr7ceXy3LcpCGQHbiWaaWHdB1uv17D7zV+KK8cCjjGct8ElDIYFT+m77Pp3ZwAaxb6568zg HNBMFFlEbSXU8z7/VkFmfRsVI16FW2FS6gCWlst4YsOK0O4t1Esw0lby2KdeKAhf2f9T47jrG38Eo G7DnsSgn9RkDsjLdxX+XZUiZ1FQ9oSpfqw8QaYKXooO3i2DA3znjdKH0V8mcrosUUJwf0zHWqgybd mlEYiaQHHgbTL1sgn2fqcw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNe5X-0005ie-OF; Thu, 02 Feb 2023 13:13:36 -0500 In-Reply-To: <87y1pgpau5.fsf@valhala.localdomain> (message from Nicolas Martyanoff on Thu, 02 Feb 2023 12:26:26 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302909 Archived-At: > From: Nicolas Martyanoff > Date: Thu, 02 Feb 2023 12:26:26 +0100 > > Eli Zaretskii writes: > > >> From: Nicolas Martyanoff > >> Cc: Nicolas Martyanoff > >> 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.