all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font-lock problems
@ 2005-09-18 10:50 Mads Jensen
  2005-09-19 14:09 ` Stefan Monnier
  2005-09-19 22:39 ` rgb
  0 siblings, 2 replies; 6+ messages in thread
From: Mads Jensen @ 2005-09-18 10:50 UTC (permalink / raw)


Hi NG,

I am trying to get font-lock to color some words, but I am not having
very much luck doing it. I am using regexp-opt for creating a list of
words to colorize. The code, that I am using is this:

<code>
(defface inducks-keyword-face
  '((t (:foreground "green"))) "face for inducks fields")

(defvar inducks-keywords (regexp-opt '("aka" "altcode" "anim" "app"
		"art" "artdir" "background" "brokpg" "cast" "changes"
		"chardesign" "code" "col" "collecting" "comment"
		"country" "date" "desc" "desc" "dir" "distrib" "edit"
		"effectsanim" "enddate" "entrycode" "equiv" "fly"
		"genre" "hero" "hiddencomm" "idc" "includedin"
		"includes" "ink" "internal" "inx" "issdate" "isslang"
		"issuecode" "issueseriescode" "issuevolumecode" "lang"
		"layout" "let" "level" "max" "missing" "music" "names"
		"orderer" "origpg" "owner" "pagel" "pages" "part" "plot"
		"price" "prod" "pscode" "pubdate" "publ" "re" "rp-de"
		"rp-dk" "rp-fi" "rp-se" "ser" "size" "source"
		"story-comm" "storycode" "storyitem" "superref"
		"superrefd" "tim" "title" "titlepref" "trans" "voices"
		"westernl" "writ" "xapp" "xref" "xrefd" "desc-fi"
		"desc-da" "desc-se" "desc-no" "desc-it" "desc-ru"
		"desc-nl" "desc-de") 'words) "inducks keywords to
		colorize")

(font-lock-add-keywords 'inducks-mode 
			'(("slam" . 'font-lock-comment-face)))

(font-lock-add-keywords 'inducks-mode 
			'(((concat 
			    "\\<\\(" inducks-keywords "\\)\\>") 
			   . 'inducks-keyword-face)))
</code>

The "slam" is not being colorized either. This is part of a major mode,
I am writing. Thank you very much in advance,
-- 
Mads Jensen - mail sent to address ends in /dev/null
              s/spam/madsj for emailing me 
              gpg: 7E775BDA

It is impossible to make anything foolproof because fools are so
ingenious.

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

end of thread, other threads:[~2005-09-21  2:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-18 10:50 font-lock problems Mads Jensen
2005-09-19 14:09 ` Stefan Monnier
2005-09-19 16:07   ` Mads Jensen
2005-09-20  9:25     ` Tim X
2005-09-21  2:34     ` Stefan Monnier
2005-09-19 22:39 ` rgb

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.