unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* search-forward and search-backward
@ 2012-11-01 21:36 drain
  0 siblings, 0 replies; only message in thread
From: drain @ 2012-11-01 21:36 UTC (permalink / raw)
  To: Help-gnu-emacs

Trying to return character positions in forward / backward
searches, but without moving point. What I have:

  (let* ((comma (save-excursion (search-forward (char-to-string 44))))
	 (period (save-excursion (search-forward (char-to-string 46))))
	 (colon (save-excursion (search-forward (char-to-string 58))))
	 (semicolon (save-excursion (search-forward (char-to-string 59)))))

Each variable contains the position of the next instance of its
specified punctuation mark, but only as the position of point at
the moment it was temporarily positioned at the character.

Is there a function that determines these positions without
resort to save-excursion and perhaps even without resort to
char-to-string?



--
View this message in context: http://emacs.1067599.n5.nabble.com/search-forward-and-search-backward-tp268594.html
Sent from the Emacs - Help mailing list archive at Nabble.com.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-01 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 21:36 search-forward and search-backward drain

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