[Top][All Lists]

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

Re: please help with font-lock-add-keywords

From: Lennart Borgman
Subject: Re: please help with font-lock-add-keywords
Date: Thu, 7 Jan 2010 02:01:40 +0100

On Thu, Jan 7, 2010 at 1:39 AM, David Combs <address@hidden> wrote:
>>> (add-hook 'lisp-mode-hook
>>>        (lambda ()
>>>          (font-lock-add-keywords
>>>           nil
>>>              '(("\\<\\(qbb-create-image\\|qbb-destroy-image\\)\\>" .
>>>                 font-lock-keyword-face)))))
>>Looks correct.  But when using the ("regexp" . face) form, you can use
>>shy groups for performance reasons, because here you refer to the whole
> Please, what is a "shy group"?   Some math thing?

It is a group that does not record sub expressions in the match.
Written with (?: ...) like

             '(("\\<\\(?:qbb-create-image\\|qbb-destroy-image\\)\\>" .

reply via email to

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