all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* syntax highlighting for comments
@ 2009-09-08  8:26 gento
  2009-09-15 16:49 ` bj
  0 siblings, 1 reply; 4+ messages in thread
From: gento @ 2009-09-08  8:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hi All,

I'm using emacs to edit journal text files *.jou, for which commented
lines
start with the character "/".

I apply the comment syntax for the "*.jou" files by adding to
the .emacs file
the lines

(add-hook 'find-file-hooks
 (lambda ()
  (when (string-match "\\.jou$" (buffer-file-name))
   (setq comment-start "/")
  )
 )
)

Now I would also like to turn the text of the commented lines into
red, and for this
I added the line

(font-lock-add-keywords nil '("\\(/.*\\)$" (1 font-lock-comment-
face)))

which unfortunately doesn’t work.

Does anybody know where the mistake is?
Many thanks

gento


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-17 10:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-08  8:26 syntax highlighting for comments gento
2009-09-15 16:49 ` bj
2009-09-15 19:03   ` Bruno Barbier
2009-09-17 10:29     ` gento

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.