emacs-diffs
[Top][All Lists]
Advanced

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

master ed72a8c 2/2: Document that the 'syntax-propertize-function' may m


From: Philipp Stephani
Subject: master ed72a8c 2/2: Document that the 'syntax-propertize-function' may move point.
Date: Sun, 30 May 2021 16:43:10 -0400 (EDT)

branch: master
commit ed72a8ccd5e32e7752102f223fac12e7ad72709b
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Document that the 'syntax-propertize-function' may move point.
    
    The functions generated by 'syntax-propertize-rules' don't use
    'save-excursion', but 'syntax-propertize' does, so we might as well
    document that the 'syntax-propertize-function' may move point.
    
    * doc/lispref/syntax.texi (Syntax Properties): Document that the
    'syntax-propertize-function' may move point.
---
 doc/lispref/syntax.texi | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 2df6c15..bde7075 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -572,12 +572,14 @@ The function is called by @code{syntax-ppss} 
(@pxref{Position Parse}),
 and by Font Lock mode during syntactic fontification (@pxref{Syntactic
 Font Lock}).  It is called with two arguments, @var{start} and
 @var{end}, which are the starting and ending positions of the text on
-which it should act.  It is allowed to call @code{syntax-ppss} on any
-position before @var{end}, but if a Lisp program calls
-@code{syntax-ppss} on some position and later modifies the buffer at
-some earlier position, then it is that program's responsibility to
-call @code{syntax-ppss-flush-cache} to flush the now obsolete info
-from the cache.
+which it should act.  It is allowed to arbitrarily move point within
+the region delimited by @var{start} and @var{end}; such motions don't
+need to use @code{save-excursion} (@pxref{Excursions}).  It is also
+allowed to call @code{syntax-ppss} on any position before @var{end},
+but if a Lisp program calls @code{syntax-ppss} on some position and
+later modifies the buffer at some earlier position, then it is that
+program's responsibility to call @code{syntax-ppss-flush-cache} to
+flush the now obsolete info from the cache.
 
 @strong{Caution:} When this variable is non-@code{nil}, Emacs removes
 @code{syntax-table} text properties arbitrarily and relies on



reply via email to

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