help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: multi-line highlighting


From: Colin Baxter
Subject: Re: multi-line highlighting
Date: Sun, 28 Feb 2021 12:34:52 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Solution is easier than I thought. This works.

#+begin_src elisp
(add-hook 'org-mode-hook (lambda ()
   (font-lock-add-keywords nil
     '( ("<alpha>\\|</alpha>" . font-lock-warning-face)
      ("<alpha>\\([^<]+?\\)</alpha>" . (1 font-lock-constant-face))
))))
#+end_src

and then put

eval: (set (make-local-variable 'font-lock-multiline) t)

as a local variable.

Sorry for answering my own question!

Best wishes,




reply via email to

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