[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Combining syntax comment sequences (yaml-mode)

From: Vasilij Schneidermann
Subject: Re: Combining syntax comment sequences (yaml-mode)
Date: Wed, 23 Dec 2015 22:56:33 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

With the given hint I was able to write up a helper function adding
`syntax-table` properties:

(defvar yaml-mode-syntax-propertize-function
   ("^#" (0 "<"))
   ("[ \t]+#" (0 "<"))))

While this looks much neater than my previous approach, it doesn't
nearly function as well.  After loading up the file, not a single
comment is highlighted correctly.  The only thing that triggers
refontification is deleting(!) text close to the comment.  Inserting
text(!!) before or after the comment disables the highlighting again.

This is inacceptable behaviour and since I'm not in the mood for
figuring out how font-lock works, I'll wait and see whether someone's
got an idea how to combine the syntax entries presented in the original

reply via email to

[Prev in Thread] Current Thread [Next in Thread]