aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra2005-05-23 12:01:32 +0000
committerLute Kamstra2005-05-23 12:01:32 +0000
commit3c8572f598f4fef7c2b1a89b8b64c6c08c03d3fd (patch)
treed7767222fe3ffe13b06c2c69082838cbadd0604e
parent359e4563cad1b8add855a43ef77b7bb5cb3f9f1d (diff)
downloademacs-3c8572f598f4fef7c2b1a89b8b64c6c08c03d3fd.tar.gz
emacs-3c8572f598f4fef7c2b1a89b8b64c6c08c03d3fd.zip
(Font Lock Basics, Syntactic Font Lock): Recommend
syntax-begin-function over font-lock-beginning-of-syntax-function.
-rw-r--r--lispref/ChangeLog5
-rw-r--r--lispref/modes.texi15
2 files changed, 12 insertions, 8 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 3dfb21ce9a4..0246206f713 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,8 @@
12005-05-23 Lute Kamstra <lute@gnu.org>
2
3 * modes.texi (Font Lock Basics, Syntactic Font Lock): Recommend
4 syntax-begin-function over font-lock-beginning-of-syntax-function.
5
12005-05-21 Luc Teirlinck <teirllm@auburn.edu> 62005-05-21 Luc Teirlinck <teirllm@auburn.edu>
2 7
3 * minibuf.texi (Reading File Names): Update description of 8 * minibuf.texi (Reading File Names): Update description of
diff --git a/lispref/modes.texi b/lispref/modes.texi
index f8230512d26..61bc878b581 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2368,7 +2368,9 @@ syntactic fontification (@pxref{Syntax Table Functions}). The
2368resulting syntax table is stored in @code{font-lock-syntax-table}. 2368resulting syntax table is stored in @code{font-lock-syntax-table}.
2369 2369
2370The fifth element, @var{syntax-begin}, specifies the value of 2370The fifth element, @var{syntax-begin}, specifies the value of
2371@code{font-lock-beginning-of-syntax-function}. 2371@code{font-lock-beginning-of-syntax-function}. We recommend setting
2372this variable to @code{nil} and using @code{syntax-begin-function}
2373instead.
2372 2374
2373All the remaining elements (if any) are collectively called 2375All the remaining elements (if any) are collectively called
2374@var{other-vars}. Each of these elements should have the form 2376@var{other-vars}. Each of these elements should have the form
@@ -2880,10 +2882,6 @@ comments and strings. Specify it using @var{syntax-alist} in
2880@code{font-lock-defaults}. 2882@code{font-lock-defaults}.
2881@end defvar 2883@end defvar
2882 2884
2883@c ???
2884@c The docstring says that font-lock-syntax-table is semi-obsolete.
2885@c How the alternative should be used is not clear. --lute
2886
2887@defvar font-lock-beginning-of-syntax-function 2885@defvar font-lock-beginning-of-syntax-function
2888If this variable is non-@code{nil}, it should be a function to move 2886If this variable is non-@code{nil}, it should be a function to move
2889point back to a position that is syntactically at ``top level'' and 2887point back to a position that is syntactically at ``top level'' and
@@ -2896,9 +2894,10 @@ the beginning of any enclosing syntactic block. Typical values are
2896be outside a syntactic block), or @code{beginning-of-defun} for 2894be outside a syntactic block), or @code{beginning-of-defun} for
2897programming modes, or @code{backward-paragraph} for textual modes. 2895programming modes, or @code{backward-paragraph} for textual modes.
2898 2896
2899If the value is @code{nil}, the beginning of the buffer is used as a 2897If the value is @code{nil}, Font Lock uses
2900position outside of a syntactic block. This cannot be wrong, but it 2898@code{syntax-begin-function} to move back outside of any comment,
2901can be slow. 2899string, or sexp. This variable is semi-obsolete; we recommend setting
2900@code{syntax-begin-function} instead.
2902 2901
2903Specify this variable using @var{syntax-begin} in 2902Specify this variable using @var{syntax-begin} in
2904@code{font-lock-defaults}. 2903@code{font-lock-defaults}.