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

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

bug#17021: 24.3.50; extension to hi-lock.el


From: Juri Linkov
Subject: bug#17021: 24.3.50; extension to hi-lock.el
Date: Mon, 17 Aug 2020 03:32:08 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> When you have a (source) file or a number of (source) files in a directory
> (structure) highlighting patterns should be applied to, you probably want
> to keep the pattern file(s) together with the source file(s) --- or at
> least within the same directory structure.  If you somehow distribute the
> source files and/or have them under version control, you are facing the
> problem of how to distribute the pattern files along with the source files
> when you have a bunch of unrelated pattern files together with relevant
> pattern files all in the same default location (i. e. some directory
> somewhere else).  And if you use the same pattern files for multiple
> projects, you don't want the pattern files used by project A altered when
> you revert to a previous commit of project B or when you merge changes to
> project C just because all the pattern are at the same default location.

All these problems were already solved long ago with the help of
Directory Local Variables.  Just put such lines to .dir-locals.el
in the root of your project:

((emacs-lisp-mode
  . ((hi-lock-file-patterns
      . ((("^;;; .*" (0 (quote hi-black-hb) t)))
         (("make-variable-buffer-\\(local\\)" (0 font-lock-keyword-face)(1 
'italic append))))))))





reply via email to

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