unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30617: 26.0.91; syntax-ppss-toplevel-pos documentation bug
@ 2018-02-26 19:32 Charles A. Roelli
  2018-03-03 12:42 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Charles A. Roelli @ 2018-02-26 19:32 UTC (permalink / raw)
  To: 30617

The commentary for `syntax-ppss-toplevel-pos' in syntax.el mentions
the "undocumented 9th field" of syntax-ppss, which has been confirmed
and documented in v26.  It looks like the comment can be removed.

(defun syntax-ppss-toplevel-pos (ppss)
  "Get the latest syntactically outermost position found in a syntactic scan.
PPSS is a scan state, as returned by `parse-partial-sexp' or `syntax-ppss'.
An \"outermost position\" means one that it is outside of any syntactic entity:
outside of any parentheses, comments, or strings encountered in the scan.
If no such position is recorded in PPSS (because the end of the scan was
itself at the outermost level), return nil."
;; BEWARE! We rely on the undocumented 9th field. The 9th field currently
;; contains the list of positions of the enclosing open-parens.
;; I.e. those positions are outside of any string/comment and the first of
;; those is outside of any paren (i.e. corresponds to a nil ppss).
;; If this list is empty but we are in a string or comment, then the 8th
;; field contains a similar "toplevel" position.





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

* bug#30617: 26.0.91; syntax-ppss-toplevel-pos documentation bug
  2018-02-26 19:32 bug#30617: 26.0.91; syntax-ppss-toplevel-pos documentation bug Charles A. Roelli
@ 2018-03-03 12:42 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2018-03-03 12:42 UTC (permalink / raw)
  To: Charles A. Roelli; +Cc: 30617-done

> Date: Mon, 26 Feb 2018 20:32:06 +0100
> From: charles@aurox.ch (Charles A. Roelli)
> 
> The commentary for `syntax-ppss-toplevel-pos' in syntax.el mentions
> the "undocumented 9th field" of syntax-ppss, which has been confirmed
> and documented in v26.  It looks like the comment can be removed.

Thanks, fixed.





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

end of thread, other threads:[~2018-03-03 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 19:32 bug#30617: 26.0.91; syntax-ppss-toplevel-pos documentation bug Charles A. Roelli
2018-03-03 12:42 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

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