diff options
author | Vincent Belaïche <vincentb1@users.sourceforge.net> | 2016-01-20 08:30:51 +0100 |
---|---|---|
committer | Vincent Belaïche <vincentb1@users.sourceforge.net> | 2016-01-20 08:30:51 +0100 |
commit | b895c72059521fec064ff27b4cfcfa4104081c4e (patch) | |
tree | c1697f0e4d95d8c3556798f6c4c53c98a4714bd0 /lisp/emacs-lisp/syntax.el | |
parent | badcd38aa86ed7973f2be2743c405710973a0bdd (diff) | |
parent | 1b76d9168336ede8976b980aeaed64ae2908501a (diff) | |
download | emacs-b895c72059521fec064ff27b4cfcfa4104081c4e.tar.gz emacs-b895c72059521fec064ff27b4cfcfa4104081c4e.tar.bz2 emacs-b895c72059521fec064ff27b4cfcfa4104081c4e.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
-rw-r--r-- | lisp/emacs-lisp/syntax.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index e20a210de71..c221a017f51 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -416,6 +416,9 @@ point (where the PPSS is equivalent 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' @@ -431,6 +434,7 @@ running the hook." (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) @@ -567,7 +571,7 @@ running the hook." ;; 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 |