Commit 4230351b authored by Chong Yidong's avatar Chong Yidong
Browse files

Update Syntax chapter of Lisp manual.

* doc/lispref/syntax.texi (Syntax Tables, Syntax Descriptors)
(Syntax Table Functions): Copyedits.
(Syntax Basics): Don't repeat the material in the preceding node.
(Syntax Class Table): Use a table.
(Syntax Properties): Document syntax-propertize-function and
syntax-propertize-extend-region-functions.
(Motion via Parsing): Fix indentation.
(Parser State): Update for the new "c" comment style.  Fix
description of item 7 (comment style).

* doc/lispref/modes.texi (Syntactic Font Lock): Add xref to Syntactic Font Lock node.
parent 74db95ca
......@@ -220,7 +220,7 @@ sequences.texi cyd
streams.texi cyd
strings.texi cyd
symbols.texi cyd
syntax.texi
syntax.texi cyd
text.texi
tips.texi
variables.texi cyd
......
2012-02-16 Chong Yidong <cyd@gnu.org>
* syntax.texi (Syntax Tables, Syntax Descriptors)
(Syntax Table Functions): Copyedits.
(Syntax Basics): Don't repeat the material in the preceding node.
(Syntax Class Table): Use a table.
(Syntax Properties): Document syntax-propertize-function and
syntax-propertize-extend-region-functions.
(Motion via Parsing): Clarify scan-lists. Fix indentation.
(Parser State): Update for the new "c" comment style. Fix
description of item 7 (comment style).
* modes.texi (Minor Modes): Update how mode commands should treat
arguments now.
(Mode Line Basics): Clarify force-mode-line-update.
......@@ -16,7 +26,8 @@
(Search-based Fontification): Emphasize that font-lock-keywords
should not be set directly.
(Faces for Font Lock): Avoid some confusing terminology.
(Syntactic Font Lock): Minor clarifications.
(Syntactic Font Lock): Minor clarifications. Add xref to
Syntactic Font Lock node.
2012-02-15 Chong Yidong <cyd@gnu.org>
......
......@@ -764,6 +764,7 @@ Major and Minor Modes
* Mode Line Format:: Customizing the text that appears in the mode line.
* Imenu:: Providing a menu of definitions made in a buffer.
* Font Lock Mode:: How modes can highlight text according to syntax.
* Auto-Indentation:: How to teach Emacs to indent for a major mode.
* Desktop Save Mode:: How modes can have buffer state saved between
Emacs sessions.
......
......@@ -2995,6 +2995,12 @@ which syntactic constructs to highlight. There are several variables
that affect syntactic fontification; you should set them by means of
@code{font-lock-defaults} (@pxref{Font Lock Basics}).
Whenever Font Lock mode performs syntactic fontification on a stretch
of text, it first calls the function specified by
@code{syntax-propertize-function}. Major modes can use this to apply
@code{syntax-table} text properties to override the buffer's syntax
table in special cases. @xref{Syntax Properties}.
@defvar font-lock-keywords-only
If the value of this variable is non-@code{nil}, Font Lock does not do
syntactic fontification, only search-based fontification based on
......@@ -3191,7 +3197,7 @@ reasonably fast.
@end defvar
@node Auto-Indentation
@section Auto-indentation of code
@section Automatic Indentation of code
For programming languages, an important feature of a major mode is to
provide automatic indentation. This is controlled in Emacs by
......@@ -3214,7 +3220,7 @@ for a compiler, but on the other hand, the parser embedded in the
indentation code will want to be somewhat friendly to syntactically
incorrect code.
Good maintainable indentation functions usually fall into 2 categories:
Good maintainable indentation functions usually fall into two categories:
either parsing forward from some ``safe'' starting point until the
position of interest, or parsing backward from the position of interest.
Neither of the two is a clearly better choice than the other: parsing
......
This diff is collapsed.
......@@ -785,6 +785,7 @@ Major and Minor Modes
* Mode Line Format:: Customizing the text that appears in the mode line.
* Imenu:: Providing a menu of definitions made in a buffer.
* Font Lock Mode:: How modes can highlight text according to syntax.
* Auto-Indentation:: How to teach Emacs to indent for a major mode.
* Desktop Save Mode:: How modes can have buffer state saved between
Emacs sessions.
......
......@@ -784,6 +784,7 @@ Major and Minor Modes
* Mode Line Format:: Customizing the text that appears in the mode line.
* Imenu:: Providing a menu of definitions made in a buffer.
* Font Lock Mode:: How modes can highlight text according to syntax.
* Auto-Indentation:: How to teach Emacs to indent for a major mode.
* Desktop Save Mode:: How modes can have buffer state saved between
Emacs sessions.
......
......@@ -1349,6 +1349,7 @@ The variable is now used to load all kind of supported dynamic libraries,
not just image libraries. The previous name is still available as an
obsolete alias.
+++
** New variable `syntax-propertize-function'.
This replaces `font-lock-syntactic-keywords' which is now obsolete.
This allows syntax-table properties to be set independently from font-lock:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment