Skip to main content
Removed superfluous #'
Source Link

When I evaluate (highlight-regexp "todo" "hi-blue") in a buffer, “todo” gets highlighted in that buffer. I’d like “todo” to be highlighted in any buffer, always.

I’ve tried putting the following code in my Aquamacs Preferences.el file (equivalent to Emacs’ .emacs), based on what I read here:

(global-hi-lock-mode 1)
(setq hi-lock-file-patterns-policy #'(lambda (dummy) t))
(highlight-regexp "todo" "hi-blue")

But “todo” doesn’t get highlighted. What am I missing?

When I evaluate (highlight-regexp "todo" "hi-blue") in a buffer, “todo” gets highlighted in that buffer. I’d like “todo” to be highlighted in any buffer, always.

I’ve tried putting the following code in my Aquamacs Preferences.el file (equivalent to Emacs’ .emacs), based on what I read here:

(global-hi-lock-mode 1)
(setq hi-lock-file-patterns-policy #'(lambda (dummy) t))
(highlight-regexp "todo" "hi-blue")

But “todo” doesn’t get highlighted. What am I missing?

When I evaluate (highlight-regexp "todo" "hi-blue") in a buffer, “todo” gets highlighted in that buffer. I’d like “todo” to be highlighted in any buffer, always.

I’ve tried putting the following code in my Aquamacs Preferences.el file (equivalent to Emacs’ .emacs), based on what I read here:

(global-hi-lock-mode 1)
(setq hi-lock-file-patterns-policy (lambda (dummy) t))
(highlight-regexp "todo" "hi-blue")

But “todo” doesn’t get highlighted. What am I missing?

Source Link

Why doesn’t highlight-regexp highlight my regexp?

When I evaluate (highlight-regexp "todo" "hi-blue") in a buffer, “todo” gets highlighted in that buffer. I’d like “todo” to be highlighted in any buffer, always.

I’ve tried putting the following code in my Aquamacs Preferences.el file (equivalent to Emacs’ .emacs), based on what I read here:

(global-hi-lock-mode 1)
(setq hi-lock-file-patterns-policy #'(lambda (dummy) t))
(highlight-regexp "todo" "hi-blue")

But “todo” doesn’t get highlighted. What am I missing?