emacs-devel
[Top][All Lists]
Advanced

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

Re: Conditionalized font-locking?


From: Stefan Monnier
Subject: Re: Conditionalized font-locking?
Date: Mon, 07 May 2012 11:05:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> (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.


        Stefan



reply via email to

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