\f
* Lisp Changes in Emacs 25.2
+** New var syntax-ppss-table to control the syntax-table used in syntax-ppss
+
** Autoload files can be generated without timestamps,
by setting `autoload-timestamps' to nil.
(error nil)))
syntax-ppss-stats))
+(defvar-local syntax-ppss-table nil
+ "Syntax-table to use during `syntax-ppss', if any.")
+
(defun syntax-ppss (&optional pos)
"Parse-Partial-Sexp State at POS, defaulting to point.
The returned value is the same as that of `parse-partial-sexp'
(unless pos (setq pos (point)))
(syntax-propertize pos)
;;
+ (with-syntax-table (or syntax-ppss-table (syntax-table))
(let ((old-ppss (cdr syntax-ppss-last))
(old-pos (car syntax-ppss-last))
(ppss nil)
;; we may end up calling parse-partial-sexp with a position before
;; point-min. In that case, just parse from point-min assuming
;; a nil state.
- (parse-partial-sexp (point-min) pos)))))
+ (parse-partial-sexp (point-min) pos))))))
;; Debugging functions
"Put proper face on each string and comment between START and END.
START should be at the beginning of a line."
(syntax-propertize end) ; Apply any needed syntax-table properties.
+ (with-syntax-table (or syntax-ppss-table (syntax-table))
(let ((comment-end-regexp
(or font-lock-comment-end-skip
(regexp-quote
font-lock-comment-delimiter-face))))
(< (point) end))
(setq state (parse-partial-sexp (point) end nil nil state
- 'syntax-table)))))
+ 'syntax-table))))))
;;; End of Syntactic fontification functions.
\f