1

Using (highlight-symbol-at-point) at some point the highlight start repeating colors.

auto highlight cycle restarts

I find the variable that holds the default face highlight color values in Emacs is: hi-lock-face-defaults

It holds this value:

("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-salmon" "hi-aquamarine" "hi-black-b" "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb")

I want to add more default colors. What is the best way to do it?

1

Set variable hi-lock-face-defaults to the names of the faces you want.

(add-to-list 'hi-lock-face-defaults "highlight") ; Add a face (`highlight`).

or

(setq hi-lock-face-defaults  ; Set to just these 3 faces.
      '("dired-flagged" "highlight" "hi-yellow"))

or

(setq hi-lock-face-defaults ; Add multiple faces.
      (append '("dired-flagged" "highlight") hi-lock-face-defaults))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.