emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f7673c1 1/2: Add a new ppss structure for syntax-ppss data


From: Lars Ingebrigtsen
Subject: master f7673c1 1/2: Add a new ppss structure for syntax-ppss data
Date: Wed, 30 Oct 2019 16:27:06 -0400 (EDT)

branch: master
commit f7673c147c8c31564dcc19eda12d9c759acee93e
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Add a new ppss structure for syntax-ppss data
    
    * lisp/emacs-lisp/syntax.el (ppss): Add a new structure to provide
    accessors to the syntax-ppss data.
---
 lisp/emacs-lisp/syntax.el | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 913e34d..9dde325 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -85,6 +85,40 @@ Put first the functions more likely to cause a change and 
cheaper to compute.")
 ;; (i.e. doesn't obey the element t in the buffer-local value).
 (make-variable-buffer-local 'syntax-propertize-extend-region-functions)
 
+(cl-defstruct (ppss
+               (:constructor make-ppss)
+               (:copier nil)
+               (:type list))
+  (depth nil :documentation "depth in parens")
+  (innermost-start
+   nil :documentation
+   "character address of start of innermost containing list; nil if none.")
+  (last-complete-sexp-start
+   nil :documentation
+   "character address of start of last complete sexp terminated.")
+  (string-terminator nil :documentation "\
+non-nil if inside a string.
+(it is the character that will terminate the string, or t if the
+string should be terminated by a generic string delimiter.)")
+  (comment-nesting nil :documentation "\
+nil if outside a comment, t if inside a non-nestable comment,
+else an integer (the current comment nesting).")
+  (after-quote-p nil :documentation "t if following a quote character.")
+  (minimum-paren-depth
+   nil :documentation "the minimum paren-depth encountered during this scan.")
+  (comment-style nil :documentation "style of comment, if any.")
+  (comment-or-string-start
+   nil :documentation
+   "character address of start of comment or string; nil if not in one.")
+  (open-paren-positions
+   nil :documentation
+   "List of positions of currently open parens, outermost first.")
+  (two-character-syntax nil :documentation "\
+When the last position scanned holds the first character of a
+(potential) two character construct, the syntax of that position,
+otherwise nil.  That construct can be a two character comment
+delimiter or an Escaped or Char-quoted character."))
+
 (defun syntax-propertize-wholelines (start end)
   (goto-char start)
   (cons (line-beginning-position)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]