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

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

What's the best way to do "string-memq"?


From: Alan Mackenzie
Subject: What's the best way to do "string-memq"?
Date: Mon, 10 Nov 2008 18:14:22 +0000
User-agent: Mutt/1.5.9i

Hi, everybody,

I need a predicate which I'd ideally like to write as

    (string-memq (char-after) skip-chars)

, where skip-chars is a string like "^;{}?:", and the predicate should
return t when (char-after) is one of (?^ ?\; ?\{ ?\} ?\? ?\:).

I can't see a convenient way to code this (no, I haven't looked into CL,
and don't want to).  Isn't there some elisp function something like
C's strchr?  Or must I dissect the string into its component characters
for a memq, or (almost as bad), regexp-quote the character from the
buffer and do `string-match' with that?

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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