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

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

`font-lock-add-keywords' works... sometimes


From: Emanuel Berg
Subject: `font-lock-add-keywords' works... sometimes
Date: Tue, 19 Mar 2019 08:26:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

It is pretty cool to have Emacs as
psychedelic/LSD-ish as possible. For example,
when one types the name of a color, that word
becomes that color!

Or when one types the name of a face, that name
becomes the color of the face! (This is not
only cool but also practical BTW.)
Screenshot:
  http://user.it.uu.se/~embe8573/figures/emacs/emacs-lisp-faces.png [1]

Or even better/worse, when one types the word
of a sound, that will play from a directory of
audio files, finding a file with the same name
(e.g. "wolf" triggers "wolf.mp3") - this will
*freak you out* when deep in concentration and
not expecting it in the least! Try it... if you
dare :)

But anyway...

Why does this work

    (font-lock-add-keywords 'message-mode
     '(
       ("yellow" . font-lock-function-name-face)
      )
     t) ; append [2]

but not this

    (font-lock-add-keywords 'text-mode
     '(
       ("yellow" . font-lock-function-name-face)
      )
     t) ; append [3]

?

TIA


[1] line 20 @ http://user.it.uu.se/~embe8573/emacs-init/faces.el
[2] line 99 @ http://user.it.uu.se/~embe8573/emacs-init/gnus/message-my.el
[3] line  9 @ http://user.it.uu.se/~embe8573/emacs-init/my-text.el

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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