unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [Emacs 27.1] Comment and delimiter highlighting
@ 2021-03-01 19:56 Marcus Harnisch
  0 siblings, 0 replies; only message in thread
From: Marcus Harnisch @ 2021-03-01 19:56 UTC (permalink / raw)
  To: emacs-devel

Hi all

What determines the assignment of faces to comment delimiters and 
comment text? Syntax table or variables such as ‘comment-start’, 
‘comment-end’, etc.

The reason I am asking is that in ‘verilog-mode’ block comment enders 
are not highlighted properly:

* Set ‘font-lock-comment-face’ and ‘font-lock-comment-delimiter-face’ to
   reasonably distinguishable colours.

* Create buffer and enable verilog-mode.

* Enter this text:

/****** ****
  ***** sdhfghg
  **** ****/

* Observe that the trailing delimiter is not assigned the expected face.
   Alternatively use ‘M-x describe-char’ to see details.

There is a second issue that I noticed when comparing with a C file,
since both languages share the same comment syntax: The asterisks
immediately following the comment start delimiter are also assigned
‘font-lock-comment-delimiter-face’, even though they are not actually
part of the delimiter. Note that highlighting of asterisks preceding
the comment end delimiter does not follow the same logic (symmetry).

Cheers,
Marcus





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-01 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 19:56 [Emacs 27.1] Comment and delimiter highlighting Marcus Harnisch

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