1

What is Parse-Partial-Sexp State at POS? Because I have been looking at some elisp code calling syntax-ppss.

I have the variable ppss being set to either (syntax-ppss) or to (parse-partial-sexp last-ppss-pos delim-pos nil nil ppss).

Am trying to decipher the following to see what one is determining from this.

(or (nth 3 ppss)
    (nth 4 ppss)
    (nth 5 ppss)
1
  • Have looked at 36.7 Syntax Table Internals.
    – Ephram
    Jul 20 at 5:06

1 Answer 1

2

If syntax-ppss is what you want, then this is what you need to do look at

Index entries that match ‘syntax-ppss’:

\0[index\0]
* Menu:

* syntax-ppss [Index]:                   Position Parse. (line 10)
* syntax-ppss-context [Index]:           Parser State. (line 72)
* syntax-ppss-flush-cache [Index]:       Position Parse. (line 34)
* syntax-ppss-toplevel-pos [Index]:      Parser State. (line 63)

which can be reached via

| C-h r                  | info-emacs-manual  | Help -> Read the Emacs Manual                                                 |
| u                      | Info-up            | Menu-bar -> Info -> Up                                                              |
| m elisp <return>       | Info-menu          | Info -> Menu Item -> Other...                                                 |
| I syntax-ppss <return> | Info-virtual-index | Menu-bar -> Info -> Index -> Lookup a string and display index of results...> |

If parse-partial-sexp is what you want then

Index entries that match ‘parse-partial-sexp’:

\0[index\0]
* Menu:

* parse-partial-sexp [Index]:            Low-Level Parsing. (line 10)

and this can be reached via

| C-h f parse-partial-sexp <return> | describe-function | Help -> Describe -> Describe Function... |
| i                                 | help-goto-info    | Menu-Bar -> Help-Mode -> Goto Info       |

Linking to info node from *Help* buffer is a recent addition. It works on Emacs built from the master, not sure about other versions.


2
  • How can I test the contents of ppss, which seems to be composed of an array?
    – Ephram
    Jul 20 at 6:36
  • "C-h r u m e l i s p <return> i a r r a y <return> n" Jul 20 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.