On 02/19/2015 02:14 PM, Juri Linkov wrote: >>> Maybe the list of all faces (that come after the default faces) >>> should be better sorted somehow, e.g. alphabetically or by use frequency. >> My vote is to just restrict the options to those specified in >> hi-lock-face-defaults. The value can be easily modified, and its a >> simple way to keep unusual and unexpected faces from appearing. > > Currently it's not too easy to modify since hi-lock-face-defaults > is defined with defvar, but not defcustom. > >> Also, how many hi-lock faces is anyone going to ever need? > > I'd say that in average 8 faces are needed, but the problem is > that hi-lock-face-defaults provides only 4 usable default faces > ("hi-yellow" "hi-pink" "hi-green" "hi-blue"). The rest of > default faces with the prefix "-b" are highlighting with bold weight, > so they are less usable. This is why often is necessary to find > more faces in the list of all faces that come after default faces. > What works for me to define faces and add them to hi-lock-face-defaults, are the following two snippets in my .emacs: (defface hi-test '((((background dark)) (:background "white" :foreground "red")) (t (:background "white"))) "Face for hi-lock mode." :group 'hi-lock-faces) (add-hook 'hi-lock-mode-hook (lambda () (setq hi-lock-face-defaults '("hi-green" "hi-blue" "hi-red" "hi-cyan" "hi-magenta" "hi-yellow" "hi-test")))) -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0