unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* What's the best way to do "string-memq"?
@ 2008-11-10 18:14 Alan Mackenzie
  2008-11-10 18:17 ` Drew Adams
  2008-11-11  4:05 ` Kevin Rodgers
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2008-11-10 18:14 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-11  4:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 18:14 What's the best way to do "string-memq"? Alan Mackenzie
2008-11-10 18:17 ` Drew Adams
2008-11-10 19:02   ` Alan Mackenzie
2008-11-10 19:00     ` Drew Adams
2008-11-11  4:05 ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).