all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Font Lock Regexp Subexp Match Question?
@ 2011-07-29  2:21 Shenli Zhu
  0 siblings, 0 replies; only message in thread
From: Shenli Zhu @ 2011-07-29  2:21 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I tried to write a new mode, but don't know how to font lock regexp
subexp match (I know how to font lock full match).

E.g. I want to font lock "c" after "p".

And I write:
(setq wf-font-lock-defaults
      '(("p\\(c\\)" 1 font-lock-function-name-face)))

and in major mode,
(setq font-lock-defaults '(wf-font-lock-defaults))

But it didn't work, any suggestion?

Thanks,
Z



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-29  2:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29  2:21 Font Lock Regexp Subexp Match Question? Shenli Zhu

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.