help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Lisp: Functions for multiple comparisons


From: Stefan Monnier <address@hidden>
Subject: Re: Lisp: Functions for multiple comparisons
Date: 20 Nov 2002 18:03:02 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Greg" == Greg Hill <ghill@synergymicro.com> writes:
>       (meq (char-syntax (following-char)) ?w ?_)
> instead of using
>       (memq (char-syntax (following-char) '(?w ?_)))

memq is pretty fast given the general slowness of the elisp interpreter.
If you really care about the few extra chars, then you can of course do

   (defun meq (x &rest xs) (memq x xs))

although I honestly don't see the point.


        Stefan


reply via email to

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