unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51230: 29.0.50; `defvar-keymap' - wrong face after `:doc'
@ 2021-10-15 23:09 Brahimi Saifullah
  2021-10-18  7:46 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Brahimi Saifullah @ 2021-10-15 23:09 UTC (permalink / raw)
  To: 51230

(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?





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#51230: 29.0.50; `defvar-keymap' - wrong face after `:doc'
  2021-10-15 23:09 bug#51230: 29.0.50; `defvar-keymap' - wrong face after `:doc' Brahimi Saifullah
@ 2021-10-18  7:46 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-18  7:46 UTC (permalink / raw)
  To: Brahimi Saifullah; +Cc: 51230

Brahimi Saifullah <brahimi.saifullah@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-18  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 23:09 bug#51230: 29.0.50; `defvar-keymap' - wrong face after `:doc' Brahimi Saifullah
2021-10-18  7:46 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).