Specifically I am trying to make below codes work: the problem is that term-default-bg-color (close to the end of code block) doesn't seem to exist universally so I am trying to get emacs background color and use that
(defun low-lock-face-phrase-buffer (regexp )
"Set face of each match of phrase REGEXP to term-default-bg-color to dim it;
internally it calls to hi-lock-face-phrase-buffer"
(interactive
(list
(hi-lock-regexp-okay
(hi-lock-process-phrase
(read-regexp "Phrase to dim" (car regexp-history))))))
(unless hi-lock-mode (hi-lock-mode 1))
(hi-lock-set-pattern regexp 'term-default-bg-color))
In general, the background color is just (face-attribute 'default :background)
.
But if you want the background color at a particular position, where there might be one or more faces displayed, then use function eyedrop-background-at-point
, from library eyedropper.el
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With