all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Supplying a default initial STATE to parse-partial-sexp. What about elt. 9?
@ 2009-06-30 16:20 Alan Mackenzie
  2009-06-30 20:22 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2009-06-30 16:20 UTC (permalink / raw)
  To: emacs-devel

Hi, Emacs!

In a function, I want to parse-partial-sexp through a buffer,
successively feeding its result back as the STATE parameter of the next
call.

To avoid an irritating special case, I'd like to initialize the state to
a default value, rather than passing in nil.  Something like:

(let ((pps-state '(0 nil 0  nil nil nil 0 nil nil nil)))
              ;;   0   1 2    3   4   5 6   7   8   9
  ....)

However, this leaves me a bit uneasy about the 9th element, which is
documented as "Intermediate data for continuation of parsing (subject to
change)".  Is it valid to set elt 9 as nil, or will this cause some sort
of malfunction or signal in parse-partial-sexp?

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).




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

end of thread, other threads:[~2009-06-30 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 16:20 Supplying a default initial STATE to parse-partial-sexp. What about elt. 9? Alan Mackenzie
2009-06-30 20:22 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.