emacs-devel
[Top][All Lists]
Advanced

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

Re: Conditionalized font-locking?


From: Stephen Berman
Subject: Re: Conditionalized font-locking?
Date: 7 May 2012 17:15:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

On Mon, 07 May 2012 11:05:27 -0400 Stefan Monnier <address@hidden> wrote:

>> (defun srb-number-matcher (lim)
>>   "Search for odd numbers within LIM for font-locking."
>>   (re-search-forward "\\<\\([0-9]+\\)\\>" lim t)
>>   (let ((num (match-string-no-properties 1)))
>>     (when (eq (logand (string-to-number num) 1) 1) num)))
>
> If the re-search-forward fails, this function will mis-behave.

D'oh!

Thanks...

Steve Berman



reply via email to

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