GNU bug report logs - #51230
29.0.50; `defvar-keymap' - wrong face after `:doc'

Previous Next

Package: emacs;

Reported by: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>

Date: Fri, 15 Oct 2021 23:11:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51230 in the body.
You can then email your comments to 51230 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51230; Package emacs. (Fri, 15 Oct 2021 23:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brahimi Saifullah <brahimi.saifullah <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Oct 2021 23:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; `defvar-keymap' - wrong face after `:doc'
Date: Fri, 15 Oct 2021 20:09:42 -0300
(defvar-keymap my-mode-map :doc "My mode map")

The string after `:doc' has the font lock face for strings,
but it should instead have the one for documentation.

Keeping in mind the fact I'm not familiar with the intricacies of (e)lisp-mode,
I came upon the function `lisp-string-after-doc-keyword-p', which,
with a trivial change to the regexp, can fix this issue.

Yet I realized `defcustom' also has a `:doc' keyword,
which is properly fontified.  So maybe that functionality
can be leveraged somehow, and the approach above is not the right thing?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51230; Package emacs. (Mon, 18 Oct 2021 07:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 51230 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Brahimi Saifullah <brahimi.saifullah <at> gmail.com>
Cc: 51230 <at> debbugs.gnu.org
Subject: Re: bug#51230: 29.0.50; `defvar-keymap' - wrong face after `:doc'
Date: Mon, 18 Oct 2021 09:46:13 +0200
Brahimi Saifullah <brahimi.saifullah <at> gmail.com> writes:

> Keeping in mind the fact I'm not familiar with the intricacies of (e)lisp-mode,
> I came upon the function `lisp-string-after-doc-keyword-p', which,
> with a trivial change to the regexp, can fix this issue.

Yup; now fixed in Emacs 29.

> Yet I realized `defcustom' also has a `:doc' keyword,
> which is properly fontified.  So maybe that functionality
> can be leveraged somehow, and the approach above is not the right thing?

`defcustom' has a doc argument, but not a keyword, so it's fontified
using a different mechanism.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 51230 <at> debbugs.gnu.org and Brahimi Saifullah <brahimi.saifullah <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 18 Oct 2021 07:47:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Nov 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.