[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 8dafacd: * lisp/emacs-lisp/syntax.el (syntax-pp
Re: [Emacs-diffs] master 8dafacd: * lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var
Sun, 17 Jan 2016 16:32:42 -0500
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
>>> * lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var
>> Are there any particular cases where we should use it?
Any time where you want to use a different syntax-table. E.g. e use it
in nxml-mode where the syntax-table to use normally should be
"text-like" (e.g. parens are matched), but where actual formal parsing
needs something very different (since nothing guarantees that parens
are matched, whereas matching <..> is a lot more useful).
I expect it to be handy as well in cases where the "normal" syntax table
may be changed at various times. E.g. this allows the use of
syntax-ppss within with-syntax-table. I actually imagine it may become
"normal and recommended" to set syntax-ppss-table in any buffer where
with-syntax-table may be used, since syntax-ppss can very easily be
triggered by accident (e.g. via forward-sexp -> syntax-propertize ->
>> You've added the var, but without any usages.
Actually there is one usage in trunk (in nxml). I just mistakenly
installed it before installing the corresponding change in syntax.el.