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

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

search-forward and search-backward


From: drain
Subject: search-forward and search-backward
Date: Thu, 1 Nov 2012 14:36:28 -0700 (PDT)

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.



reply via email to

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