[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: forward-sexp for strings
From: |
Roland Winkler |
Subject: |
Re: forward-sexp for strings |
Date: |
Thu, 10 Nov 2005 21:51:29 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Pascal Bourguignon <spam@mouse-potato.com> writes:
> Roland Winkler <roland.winkler@physik.uni-erlangen.de> writes:
>
>> The function forward-sexp requires a buffer. Is there something
>> similar for parsing strings? Of course, I can always use
>> with-temp-buffer.
>
> (require 'cl)
> (loop with s = "(sexp 1) (sexp 2) \"sexp 3\" sexp-4"
> with e = 0
> for oe = (read-from-string s e)
> do (print (car oe))
> while (< (setf e (cdr oe)) (length s)))
Do I need here the (require 'cl)? It seems to me that
read-from-string is really the important thing in your example. And
if this function obeys the current syntax-table (the doc string
doesn't say anything about that) it should be exactly what I am
looking for.
Thanks!
Roland
- forward-sexp for strings, Roland Winkler, 2005/11/10
- Message not available
- Re: forward-sexp for strings,
Roland Winkler <=
- Message not available