Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

search-forward and search-backward

5 views
Skip to first unread message

drain

unread,
Nov 1, 2012, 5:36:28 PM11/1/12
to Help-gn...@gnu.org
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.

0 new messages