Go to the first, previous, next, last section, table of contents.
-
You can use two new functions to move across characters in certain
syntax classes.
skip-syntax-forward
moves point forward across characters whose
syntax classes are mentioned in its first argument, a string. It stops
when it encounters the end of the buffer, or position lim (the
optional second argument), or a character it is not supposed to skip.
The function skip-syntax-backward
is similar but moves backward.
-
The new function
forward-comment
moves point by comments. It
takes one argument, count; it moves point forward across
count comments (backward, if count is negative). If it
finds anything other than a comment or whitespace, it stops, leaving
point at the far side of the last comment found. It also stops after
satisfying count.
-
The new variable
words-include-escapes
affects the behavior of
forward-word
and everything that uses it. If it is
non-nil
, then characters in the "escape" and "character
quote" syntax classes count as part of words.
-
There are two new syntax flags for use in syntax tables.
-
The prefix flag.
The `p' flag identifies additional "prefix characters" in Lisp
syntax. You can set this flag with
modify-syntax-entry
by
including the letter `p' in the syntax specification.
These characters are treated as whitespace when they appear between
expressions. When they appear withing an expression, they are handled
according to their usual syntax codes.
The function backward-prefix-chars
moves back over these
characters, as well as over characters whose primary syntax class is
prefix (`'').
-
The `b' comment style flag.
Emacs can now supports two comment styles simultaneously. (This is for
the sake of C++.) More specifically, it can recognize two different
comment-start sequences. Both must share the same first character; only
the second character may differ. Mark the second character of the
`b'-style comment start sequence with the `b' flag. You can
set this flag with
modify-syntax-entry
by including the letter
`b' in the syntax specification.
The two styles of comment can have different comment-end sequences. A
comment-end sequence (one or two characters) applies to the `b'
style if its first character has the `b' flag set; otherwise, it
applies to the `a' style.
The appropriate comment syntax settings for C++ are as follows:
- `/'
-
`124b'
- `*'
-
`23'
- newline
-
`>b'
Thus `/*' is a comment-start sequence for `a' style, `//'
is a comment-start sequence for `b' style, `*/' is a
comment-end sequence for `a' style, and newline is a comment-end
sequence for `b' style.
Go to the first, previous, next, last section, table of contents.