Shorten some ppss struct field names

* lisp/emacs-lisp/syntax.el (ppss): Capitalize docstrings.
(ppss-comment-depth): Renamed from ppss-comment-nesting.
(ppss-quoted-p): Renamed from ppss-after-quote-p.
(ppss-min-depth): Renamed from ppss-minimum-paren-depth.
(ppss-open-parens): Renamed from ppss-open-paren-positions.
* etc/NEWS: Announce the ppss-* accessors.
This commit is contained in:
Noam Postavsky 2020-02-23 08:26:35 -05:00
parent 693749c60f
commit ba7004b2a7
2 changed files with 21 additions and 13 deletions

View file

@ -3351,6 +3351,14 @@ brackets at the start of a line inside documentation strings with a
backslash, although there is no harm in doing so to make the code backslash, although there is no harm in doing so to make the code
easier to edit with an older Emacs version. easier to edit with an older Emacs version.
---
** New symbolic accessor functions for a parse state list.
The new accessor functions 'ppss-depth', 'ppss-list-start',
'ppss-last-sexp-start', 'ppss-string-terminator', 'comment-depth',
'quoted-p', 'comment-style', 'comment-or-string-start', 'open-parens',
and 'two-character-syntax' can be used on the list value returned by
'parse-partial-sexp' and 'syntax-ppss'.
--- ---
** The 'server-name' and 'server-socket-dir' variables are set when a ** The 'server-name' and 'server-socket-dir' variables are set when a
socket has been passed to Emacs. socket has been passed to Emacs.

View file

@ -89,33 +89,33 @@ Put first the functions more likely to cause a change and cheaper to compute.")
(:constructor make-ppss) (:constructor make-ppss)
(:copier nil) (:copier nil)
(:type list)) (:type list))
(depth nil :documentation "depth in parens") (depth nil :documentation "Depth in parens.")
(innermost-start (innermost-start
nil :documentation nil :documentation
"character address of start of innermost containing list; nil if none.") "Character address of start of innermost containing list; nil if none.")
(last-complete-sexp-start (last-complete-sexp-start
nil :documentation nil :documentation
"character address of start of last complete sexp terminated.") "Character address of start of last complete sexp terminated.")
(string-terminator nil :documentation "\ (string-terminator nil :documentation "\
non-nil if inside a string. Non-nil if inside a string.
(it is the character that will terminate the string, or t if the \(it is the character that will terminate the string, or t if the
string should be terminated by a generic string delimiter.)") string should be terminated by a generic string delimiter.)")
(comment-nesting nil :documentation "\ (comment-depth nil :documentation "\
nil if outside a comment, t if inside a non-nestable comment, nil if outside a comment, t if inside a non-nestable comment,
else an integer (the current comment nesting).") else an integer (the current comment nesting).")
(after-quote-p nil :documentation "t if following a quote character.") (quoted-p nil :documentation "t if following a quote character.")
(minimum-paren-depth (min-depth
nil :documentation "the minimum paren-depth encountered during this scan.") nil :documentation "The minimum depth in parens encountered during this scan.")
(comment-style nil :documentation "style of comment, if any.") (comment-style nil :documentation "Style of comment, if any.")
(comment-or-string-start (comment-or-string-start
nil :documentation nil :documentation
"character address of start of comment or string; nil if not in one.") "Character address of start of comment or string; nil if not in one.")
(open-paren-positions (open-parens
nil :documentation nil :documentation
"List of positions of currently open parens, outermost first.") "List of positions of currently open parens, outermost first.")
(two-character-syntax nil :documentation "\ (two-character-syntax nil :documentation "\
When the last position scanned holds the first character of a When the last position scanned holds the first character of a
(potential) two character construct, the syntax of that position, \(potential) two character construct, the syntax of that position,
otherwise nil. That construct can be a two character comment otherwise nil. That construct can be a two character comment
delimiter or an Escaped or Char-quoted character.")) delimiter or an Escaped or Char-quoted character."))