aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog144
-rw-r--r--lispref/Makefile.in2
-rw-r--r--lispref/anti.texi3
-rw-r--r--lispref/debugging.texi35
-rw-r--r--lispref/display.texi16
-rw-r--r--lispref/edebug.texi99
-rw-r--r--lispref/elisp.texi32
-rw-r--r--lispref/intro.texi6
-rw-r--r--lispref/modes.texi96
-rw-r--r--lispref/searching.texi53
-rw-r--r--lispref/syntax.texi38
-rw-r--r--lispref/text.texi84
12 files changed, 427 insertions, 181 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 6077deea9bb..c565e8bdb5f 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,106 @@
12005-06-14 Luc Teirlinck <teirllm@auburn.edu>
2
3 * elisp.texi (Top): Update detailed menu.
4
5 * edebug.texi (Edebug): Update menu.
6 (Instrumenting): Update xrefs.
7 (Edebug Execution Modes): Correct xref.
8 (Jumping): Clarify description of `h' command.
9 Eliminate redundant @ref.
10 (Breaks): New node.
11 (Breakpoints): is now a subsubsection.
12 (Global Break Condition): Mention `C-x X X'.
13 (Edebug Views): Clarify `v' and `p'. Mention `C-x X w'.
14 (Trace Buffer): Clarify STRING arg of `edebug-tracing'.
15 (Edebug Display Update): Correct pxref.
16 (Edebug and Macros): New node.
17 (Instrumenting Macro Calls): Is now a subsubsection.
18 Neither arg of `def-edebug-spec' is evaluated.
19 (Instrumenting Macro Calls): Mention `edebug-eval-macro-args'.
20 (Specification Examples): Fix typo.
21
222005-06-14 Lute Kamstra <lute@gnu.org>
23
24 * debugging.texi (Function Debugging): Primitives can break on
25 entry too.
26
272005-06-14 Kim F. Storm <storm@cua.dk>
28
29 * variables.texi (Setting Variables): Add add-to-ordered-list.
30
312005-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
32
33 * syntax.texi (Parsing Expressions): Document aux functions and vars of
34 syntax-ppss: syntax-ppss-flush-cache and syntax-begin-function.
35
362005-06-13 Lute Kamstra <lute@gnu.org>
37
38 * text.texi (Special Properties): Fix cross reference.
39
402005-06-11 Luc Teirlinck <teirllm@auburn.edu>
41
42 * debugging.texi (Function Debugging): Delete mention of empty
43 string argument to `cancel-debug-on-entry'. Delete inaccurate
44 description of the return value of that command.
45
462005-06-11 Alan Mackenzie <acm@muc.de>
47
48 * text.texi (Adaptive Fill): Amplify the description of
49 fill-context-prefix.
50
512005-06-10 Luc Teirlinck <teirllm@auburn.edu>
52
53 * syntax.texi (Parsing Exprssions): Fix Texinfo error.
54
552005-06-10 Stefan Monnier <monnier@iro.umontreal.ca>
56
57 * syntax.texi (Parsing Expressions): Document syntax-ppss.
58
592005-06-10 Luc Teirlinck <teirllm@auburn.edu>
60
61 * debugging.texi (Error Debugging): Minor rewording.
62 (Function Debugging): FUNCTION-NAME arg to `cancel-debug-on-entry'
63 is optional.
64
652005-06-10 Lute Kamstra <lute@gnu.org>
66
67 * elisp.texi: Use EMACSVER to refer to the current version of Emacs.
68 (Top): Give it a title. Correct version number. Give the
69 detailed node listing a more prominent header.
70 * intro.texi: Don't set VERSION here a second time.
71 Mention Emacs's version too.
72 * anti.texi (Antinews): Use EMACSVER to refer to the current
73 version of Emacs.
74
752005-06-09 Kim F. Storm <storm@cua.dk>
76
77 * searching.texi (Entire Match Data): Explain new `reseat' argument to
78 match-data and set-match-data.
79
802005-06-08 Richard M. Stallman <rms@gnu.org>
81
82 * searching.texi (Entire Match Data): Clarify when match-data
83 returns markers and when integers.
84
85 * display.texi (Defining Faces): Explain that face name should not
86 end in `-face'.
87
88 * modes.texi (Mode Line Data): Minor cleanup.
89 (Customizing Keywords): Node split out of Search-based Fontification.
90 Add example of using font-lock-add-keywords from a hook.
91 Clarify when MODE should be non-nil, and when nil.
92
932005-06-06 Richard M. Stallman <rms@gnu.org>
94
95 * modes.texi (Mode Line Data): Explain what happens when the car
96 of a list is a void symbol.
97 (Search-based Fontification): Explain MODE arg to
98 font-lock-add-keywords and warn about calls from major modes.
99
1002005-06-08 Juri Linkov <juri@jurta.org>
101
102 * display.texi (Standard Faces): Add `shadow' face.
103
12005-05-29 Luc Teirlinck <teirllm@auburn.edu> 1042005-05-29 Luc Teirlinck <teirllm@auburn.edu>
2 105
3 * modes.texi (Major Mode Conventions): A derived mode only needs 106 * modes.texi (Major Mode Conventions): A derived mode only needs
@@ -49,8 +152,8 @@
49 152
502005-05-21 Eli Zaretskii <eliz@gnu.org> 1532005-05-21 Eli Zaretskii <eliz@gnu.org>
51 154
52 * files.texi (Locating Files): New subsection. Describe 155 * files.texi (Locating Files): New subsection.
53 locate-file and executable-find. 156 Describe locate-file and executable-find.
54 157
552005-05-21 Kevin Ryde <user42@zip.com.au> 1582005-05-21 Kevin Ryde <user42@zip.com.au>
56 159
@@ -65,8 +168,8 @@
65 (Major Mode Conventions): Refer to `Auto Major Mode' in more 168 (Major Mode Conventions): Refer to `Auto Major Mode' in more
66 appropriate place. 169 appropriate place.
67 (Derived Modes): Small clarifications. 170 (Derived Modes): Small clarifications.
68 (Minor Mode Conventions, Keymaps and Minor Modes): Replace 171 (Minor Mode Conventions, Keymaps and Minor Modes):
69 references to nodes with references to anchors. 172 Replace references to nodes with references to anchors.
70 (Mode Line Data): Warn that `(:eval FORM)' should not load any files. 173 (Mode Line Data): Warn that `(:eval FORM)' should not load any files.
71 Clarify description of lists whose first element is an integer. 174 Clarify description of lists whose first element is an integer.
72 (Mode Line Variables): Add anchor. 175 (Mode Line Variables): Add anchor.
@@ -218,10 +321,10 @@
218 (Font Lock Basics): Say that font-lock-defaults is buffer-local 321 (Font Lock Basics): Say that font-lock-defaults is buffer-local
219 when set and that some parts are optional. Add cross references. 322 when set and that some parts are optional. Add cross references.
220 (Search-based Fontification): Say how to specify font-lock-keywords. 323 (Search-based Fontification): Say how to specify font-lock-keywords.
221 Add cross references. Add font-lock-multiline to index. Move 324 Add cross references. Add font-lock-multiline to index.
222 font-lock-keywords-case-fold-search here from node "Other Font 325 Move font-lock-keywords-case-fold-search here from node "Other Font
223 Lock Variables". Document font-lock-add-keywords and 326 Lock Variables". Document font-lock-add-keywords and
224 font-lock-remove-keywords 327 font-lock-remove-keywords.
225 (Other Font Lock Variables): Move font-lock-keywords-only, 328 (Other Font Lock Variables): Move font-lock-keywords-only,
226 font-lock-syntax-table, font-lock-beginning-of-syntax-function, 329 font-lock-syntax-table, font-lock-beginning-of-syntax-function,
227 and font-lock-syntactic-face-function to node "Syntactic Font 330 and font-lock-syntactic-face-function to node "Syntactic Font
@@ -236,8 +339,8 @@
236 and font-lock-syntactic-face-function here from node "Other Font 339 and font-lock-syntactic-face-function here from node "Other Font
237 Lock Variables". Move font-lock-syntactic-keywords to "Setting 340 Lock Variables". Move font-lock-syntactic-keywords to "Setting
238 Syntax Properties". Add cross references. 341 Syntax Properties". Add cross references.
239 (Setting Syntax Properties): New node. Move 342 (Setting Syntax Properties): New node.
240 font-lock-syntactic-keywords here from "Syntactic Font Lock". 343 Move font-lock-syntactic-keywords here from "Syntactic Font Lock".
241 * syntax.texi (Syntax Properties): Add cross reference. 344 * syntax.texi (Syntax Properties): Add cross reference.
242 * hooks.texi (Standard Hooks): Add Font-Lock hooks. 345 * hooks.texi (Standard Hooks): Add Font-Lock hooks.
243 346
@@ -296,7 +399,7 @@
296 399
2972005-04-19 Kevin Ryde <user42@zip.com.au> 4002005-04-19 Kevin Ryde <user42@zip.com.au>
298 401
299 * streams.texi (Output Functions): Fix xref. 402 * streams.texi (Output Functions): Fix xref.
300 * strings.texi (String Conversion): Fix xref. 403 * strings.texi (String Conversion): Fix xref.
301 404
3022005-04-19 Kim F. Storm <storm@cua.dk> 4052005-04-19 Kim F. Storm <storm@cua.dk>
@@ -390,8 +493,8 @@
390 493
391 * markers.texi (The Mark): Document temporary Transient Mark mode. 494 * markers.texi (The Mark): Document temporary Transient Mark mode.
392 495
393 * minibuf.texi (Reading File Names): Document 496 * minibuf.texi (Reading File Names):
394 read-file-name-completion-ignore-case. 497 Document read-file-name-completion-ignore-case.
395 498
396 * positions.texi (Screen Lines): Document nil for width argument 499 * positions.texi (Screen Lines): Document nil for width argument
397 to compute-motion. 500 to compute-motion.
@@ -411,11 +514,10 @@
411 (Managing Overlays): Document remove-overlays. 514 (Managing Overlays): Document remove-overlays.
412 (Standard Faces): Document escape-glyph face. 515 (Standard Faces): Document escape-glyph face.
413 516
414 * minibuf.texi (Reading File Names): Document 517 * minibuf.texi (Reading File Names): Document read-file-name-function.
415 read-file-name-function.
416 518
417 * modes.texi (Other Font Lock Variables): Document 519 * modes.texi (Other Font Lock Variables):
418 font-lock-lines-before. 520 Document font-lock-lines-before.
419 521
420 * positions.texi (Skipping Characters): skip-chars-forward allows 522 * positions.texi (Skipping Characters): skip-chars-forward allows
421 character classes. 523 character classes.
@@ -469,18 +571,18 @@
469 (Progress): Clarify. 571 (Progress): Clarify.
470 (Invisible Text): Explain that main loop moves point out. 572 (Invisible Text): Explain that main loop moves point out.
471 (Selective Display): Say "hidden", not "invisible". 573 (Selective Display): Say "hidden", not "invisible".
472 (Managing Overlays): Moved up. Describe relation to Undo here. 574 (Managing Overlays): Move up. Describe relation to Undo here.
473 (Overlay Properties): Clarify intro. 575 (Overlay Properties): Clarify intro.
474 (Finding Overlays): Explain return values when nothing found. 576 (Finding Overlays): Explain return values when nothing found.
475 (Width): truncate-string-to-width has added arg. 577 (Width): truncate-string-to-width has added arg.
476 (Displaying Faces): Clarify and update mode line face handling. 578 (Displaying Faces): Clarify and update mode line face handling.
477 (Face Functions): Minor cleanup. 579 (Face Functions): Minor cleanup.
478 (Conditional Display): Merged into Other Display Specs. 580 (Conditional Display): Merge into Other Display Specs.
479 (Pixel Specification, Other Display Specs): Minor cleanups. 581 (Pixel Specification, Other Display Specs): Minor cleanups.
480 (Images, Image Descriptors): Minor cleanups. 582 (Images, Image Descriptors): Minor cleanups.
481 (GIF Images): Patents have expired. 583 (GIF Images): Patents have expired.
482 (Showing Images): Explain default text for insert-image. 584 (Showing Images): Explain default text for insert-image.
483 (Manipulating Button Types): Merged into Manipulating Buttons. 585 (Manipulating Button Types): Merge into Manipulating Buttons.
484 (Making Buttons): Explain return values. 586 (Making Buttons): Explain return values.
485 (Button Buffer Commands): Add xref. 587 (Button Buffer Commands): Add xref.
486 (Inverse Video): Update mode-line-inverse-video. 588 (Inverse Video): Update mode-line-inverse-video.
@@ -840,8 +942,8 @@
840 * commands.texi (Misc Events): Describe the help-echo event. 942 * commands.texi (Misc Events): Describe the help-echo event.
841 943
842 * text.texi (Special Properties) <help-echo>: Use `pos' 944 * text.texi (Special Properties) <help-echo>: Use `pos'
843 consistently in description of the help-echo property. Use 945 consistently in description of the help-echo property.
844 @code{nil} instead of @var{nil}. 946 Use @code{nil} instead of @var{nil}.
845 947
846 * display.texi (Overlay Properties): Fix the index entry for 948 * display.texi (Overlay Properties): Fix the index entry for
847 help-echo overlay property. 949 help-echo overlay property.
diff --git a/lispref/Makefile.in b/lispref/Makefile.in
index 2fab86ab876..f2e5e46874f 100644
--- a/lispref/Makefile.in
+++ b/lispref/Makefile.in
@@ -124,7 +124,7 @@ distclean: clean
124 124
125maintainer-clean: clean 125maintainer-clean: clean
126 rm -f elisp.dvi elisp.oaux 126 rm -f elisp.dvi elisp.oaux
127 cd $(infodir); rm -f elisp elisp-[1-9] elisp-[1-9][0-9] 127 cd $(infodir); rm -f elisp elisp-[1-9] elisp-[1-9][0-9]
128 128
129dist: $(infodir)/elisp elisp.dvi 129dist: $(infodir)/elisp elisp.dvi
130 -rm -rf temp 130 -rm -rf temp
diff --git a/lispref/anti.texi b/lispref/anti.texi
index 458409f2603..46375f3f157 100644
--- a/lispref/anti.texi
+++ b/lispref/anti.texi
@@ -10,7 +10,8 @@
10 10
11For those users who live backwards in time, here is information about 11For those users who live backwards in time, here is information about
12downgrading to Emacs version 21.4. We hope you will enjoy the greater 12downgrading to Emacs version 21.4. We hope you will enjoy the greater
13simplicity that results from the absence of many Emacs 22 features. 13simplicity that results from the absence of many Emacs @value{EMACSVER}
14features.
14 15
15@section Old Lisp Features in Emacs 21 16@section Old Lisp Features in Emacs 21
16 17
diff --git a/lispref/debugging.texi b/lispref/debugging.texi
index 07dfe18f283..739dd1fe298 100644
--- a/lispref/debugging.texi
+++ b/lispref/debugging.texi
@@ -118,8 +118,8 @@ the error. The easiest way is usually to set
118@end defopt 118@end defopt
119 119
120@defopt eval-expression-debug-on-error 120@defopt eval-expression-debug-on-error
121If you set this variable to a non-@code{nil} value, then 121If this variable has a non-@code{nil} value, then
122@code{debug-on-error} will be set to @code{t} when evaluating with the 122@code{debug-on-error} is set to @code{t} when evaluating with the
123command @code{eval-expression}. If 123command @code{eval-expression}. If
124@code{eval-expression-debug-on-error} is @code{nil}, then the value of 124@code{eval-expression-debug-on-error} is @code{nil}, then the value of
125@code{debug-on-error} is not changed. @xref{Lisp Eval,, Evaluating 125@code{debug-on-error} is not changed. @xref{Lisp Eval,, Evaluating
@@ -210,15 +210,19 @@ called shortly before the problem, step quickly over the call to that
210function, and then step through its caller. 210function, and then step through its caller.
211 211
212@deffn Command debug-on-entry function-name 212@deffn Command debug-on-entry function-name
213This function requests @var{function-name} to invoke the debugger each time 213This function requests @var{function-name} to invoke the debugger each
214it is called. It works by inserting the form @code{(debug 'debug)} into 214time it is called. It works by inserting the form
215the function definition as the first form. 215@code{(implement-debug-on-entry)} into the function definition as the
216 216first form.
217Any function defined as Lisp code may be set to break on entry, 217
218regardless of whether it is interpreted code or compiled code. If the 218Any function or macro defined as Lisp code may be set to break on
219function is a command, it will enter the debugger when called from Lisp 219entry, regardless of whether it is interpreted code or compiled code.
220and when called interactively (after the reading of the arguments). You 220If the function is a command, it will enter the debugger when called
221can't debug primitive functions (i.e., those written in C) this way. 221from Lisp and when called interactively (after the reading of the
222arguments). You can also set debug-on-entry for primitive functions
223(i.e., those written in C) this way, but it only takes effect when the
224primitive is called from Lisp code. Debug-on-entry is not allowed for
225special forms.
222 226
223When @code{debug-on-entry} is called interactively, it prompts for 227When @code{debug-on-entry} is called interactively, it prompts for
224@var{function-name} in the minibuffer. If the function is already set 228@var{function-name} in the minibuffer. If the function is already set
@@ -267,16 +271,13 @@ Debugger entered--entering a function:
267@end example 271@end example
268@end deffn 272@end deffn
269 273
270@deffn Command cancel-debug-on-entry function-name 274@deffn Command cancel-debug-on-entry &optional function-name
271This function undoes the effect of @code{debug-on-entry} on 275This function undoes the effect of @code{debug-on-entry} on
272@var{function-name}. When called interactively, it prompts for 276@var{function-name}. When called interactively, it prompts for
273@var{function-name} in the minibuffer. If @var{function-name} is 277@var{function-name} in the minibuffer. If @var{function-name} is
274@code{nil} or the empty string, it cancels break-on-entry for all 278omitted or @code{nil}, it cancels break-on-entry for all functions.
275functions.
276
277Calling @code{cancel-debug-on-entry} does nothing to a function which is 279Calling @code{cancel-debug-on-entry} does nothing to a function which is
278not currently set up to break on entry. It always returns 280not currently set up to break on entry.
279@var{function-name}.
280@end deffn 281@end deffn
281 282
282@node Explicit Debug 283@node Explicit Debug
diff --git a/lispref/display.texi b/lispref/display.texi
index 7b4db373f63..87520fb4d4f 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1775,6 +1775,11 @@ This face forces use of a particular fixed-width font.
1775This face forces use of a particular variable-width font. It's 1775This face forces use of a particular variable-width font. It's
1776reasonable to customize this to use a different variable-width font, if 1776reasonable to customize this to use a different variable-width font, if
1777you like, but you should not make it a fixed-width font. 1777you like, but you should not make it a fixed-width font.
1778
1779@item shadow
1780@kindex shadow @r{(face name)}
1781This face is used for making the text less noticeable than the
1782surrounding ordinary text.
1778@end table 1783@end table
1779 1784
1780@defvar show-trailing-whitespace 1785@defvar show-trailing-whitespace
@@ -1790,14 +1795,15 @@ end of a line.
1790 The way to define a new face is with @code{defface}. This creates a 1795 The way to define a new face is with @code{defface}. This creates a
1791kind of customization item (@pxref{Customization}) which the user can 1796kind of customization item (@pxref{Customization}) which the user can
1792customize using the Customization buffer (@pxref{Easy Customization,,, 1797customize using the Customization buffer (@pxref{Easy Customization,,,
1793emacs, The GNU Emacs Manual}). 1798emacs, The GNU Emacs Manual}).
1794 1799
1795@defmac defface face spec doc [keyword value]... 1800@defmac defface face spec doc [keyword value]...
1796This declares @var{face} as a customizable face that defaults according 1801This declares @var{face} as a customizable face that defaults
1797to @var{spec}. You should not quote the symbol @var{face}. The 1802according to @var{spec}. You should not quote the symbol @var{face},
1803and it should not end in @samp{-face} (that would be redundant). The
1798argument @var{doc} specifies the face documentation. The keywords you 1804argument @var{doc} specifies the face documentation. The keywords you
1799can use in @code{defface} are the same ones that are meaningful in both 1805can use in @code{defface} are the same as in @code{defgroup} and
1800@code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). 1806@code{defcustom} (@pxref{Common Keywords}).
1801 1807
1802When @code{defface} executes, it defines the face according to 1808When @code{defface} executes, it defines the face according to
1803@var{spec}, then uses any customizations that were read from the 1809@var{spec}, then uses any customizations that were read from the
diff --git a/lispref/edebug.texi b/lispref/edebug.texi
index cc42926ecf7..981afbb894c 100644
--- a/lispref/edebug.texi
+++ b/lispref/edebug.texi
@@ -65,7 +65,7 @@ enable you to use it.
65* Modes: Edebug Execution Modes. Execution modes, stopping more or less often. 65* Modes: Edebug Execution Modes. Execution modes, stopping more or less often.
66* Jumping:: Commands to jump to a specified place. 66* Jumping:: Commands to jump to a specified place.
67* Misc: Edebug Misc. Miscellaneous commands. 67* Misc: Edebug Misc. Miscellaneous commands.
68* Breakpoints:: Setting breakpoints to make the program stop. 68* Breaks:: Setting breakpoints to make the program stop.
69* Trapping Errors:: Trapping errors with Edebug. 69* Trapping Errors:: Trapping errors with Edebug.
70* Views: Edebug Views. Views inside and outside of Edebug. 70* Views: Edebug Views. Views inside and outside of Edebug.
71* Eval: Edebug Eval. Evaluating expressions within Edebug. 71* Eval: Edebug Eval. Evaluating expressions within Edebug.
@@ -75,7 +75,7 @@ enable you to use it.
75* Trace Buffer:: How to produce trace output in a buffer. 75* Trace Buffer:: How to produce trace output in a buffer.
76* Coverage Testing:: How to test evaluation coverage. 76* Coverage Testing:: How to test evaluation coverage.
77* The Outside Context:: Data that Edebug saves and restores. 77* The Outside Context:: Data that Edebug saves and restores.
78* Instrumenting Macro Calls:: Specifying how to handle macro calls. 78* Edebug and Macros:: Specifying how to handle macro calls.
79* Options: Edebug Options. Option variables for customizing Edebug. 79* Options: Edebug Options. Option variables for customizing Edebug.
80@end menu 80@end menu
81 81
@@ -203,13 +203,13 @@ function.
203@code{interactive} forms with an expression argument, anonymous lambda 203@code{interactive} forms with an expression argument, anonymous lambda
204expressions, and other defining forms. However, Edebug cannot determine 204expressions, and other defining forms. However, Edebug cannot determine
205on its own what a user-defined macro will do with the arguments of a 205on its own what a user-defined macro will do with the arguments of a
206macro call, so you must provide that information; see @ref{Instrumenting 206macro call, so you must provide that information; see @ref{Edebug and
207Macro Calls}, for details. 207Macros}, for details.
208 208
209 When Edebug is about to instrument code for the first time in a 209 When Edebug is about to instrument code for the first time in a
210session, it runs the hook @code{edebug-setup-hook}, then sets it to 210session, it runs the hook @code{edebug-setup-hook}, then sets it to
211@code{nil}. You can use this to load Edebug specifications 211@code{nil}. You can use this to load Edebug specifications
212(@pxref{Instrumenting Macro Calls}) associated with a package you are 212(@pxref{Edebug and Macros}) associated with a package you are
213using, but only when you use Edebug. 213using, but only when you use Edebug.
214 214
215@findex eval-expression @r{(Edebug)} 215@findex eval-expression @r{(Edebug)}
@@ -253,7 +253,7 @@ Step: stop at the next stop point encountered (@code{edebug-step-mode}).
253@item n 253@item n
254Next: stop at the next stop point encountered after an expression 254Next: stop at the next stop point encountered after an expression
255(@code{edebug-next-mode}). Also see @code{edebug-forward-sexp} in 255(@code{edebug-next-mode}). Also see @code{edebug-forward-sexp} in
256@ref{Edebug Misc}. 256@ref{Jumping}.
257 257
258@item t 258@item t
259Trace: pause (normally one second) at each Edebug stop point 259Trace: pause (normally one second) at each Edebug stop point
@@ -341,9 +341,8 @@ Run the program until the end of the containing sexp.
341Step into the function or macro called by the form after point. 341Step into the function or macro called by the form after point.
342@end table 342@end table
343 343
344The @kbd{h} command proceeds to the stop point near the current location 344The @kbd{h} command proceeds to the stop point at or after the current
345of point, using a temporary breakpoint. See @ref{Breakpoints}, for more 345location of point, using a temporary breakpoint.
346information about breakpoints.
347 346
348The @kbd{f} command runs the program forward over one expression. More 347The @kbd{f} command runs the program forward over one expression. More
349precisely, it sets a temporary breakpoint at the position that 348precisely, it sets a temporary breakpoint at the position that
@@ -427,14 +426,23 @@ recursively. Whenever Edebug is active, you can quit to the top level
427with @kbd{q} or abort one recursive edit level with @kbd{C-]}. You can 426with @kbd{q} or abort one recursive edit level with @kbd{C-]}. You can
428display a backtrace of all the pending evaluations with @kbd{d}. 427display a backtrace of all the pending evaluations with @kbd{d}.
429 428
430@node Breakpoints 429@node Breaks
431@subsection Breakpoints 430@subsection Breaks
432 431
433@cindex breakpoints
434Edebug's step mode stops execution when the next stop point is reached. 432Edebug's step mode stops execution when the next stop point is reached.
435There are three other ways to stop Edebug execution once it has started: 433There are three other ways to stop Edebug execution once it has started:
436breakpoints, the global break condition, and source breakpoints. 434breakpoints, the global break condition, and source breakpoints.
437 435
436@menu
437* Breakpoints:: Breakpoints at stop points.
438* Global Break Condition:: Breaking on an event.
439* Source Breakpoints:: Embedding breakpoints in source code.
440@end menu
441
442@node Breakpoints
443@subsubsection Breakpoints
444
445@cindex breakpoints
438While using Edebug, you can specify @dfn{breakpoints} in the program you 446While using Edebug, you can specify @dfn{breakpoints} in the program you
439are testing: these are places where execution should stop. You can set a 447are testing: these are places where execution should stop. You can set a
440breakpoint at any stop point, as defined in @ref{Using Edebug}. For 448breakpoint at any stop point, as defined in @ref{Using Edebug}. For
@@ -494,12 +502,6 @@ function, or to the first breakpoint if there are no following
494breakpoints. This command does not continue execution---it just moves 502breakpoints. This command does not continue execution---it just moves
495point in the buffer. 503point in the buffer.
496 504
497@menu
498* Global Break Condition:: Breaking on an event.
499* Source Breakpoints:: Embedding breakpoints in source code.
500@end menu
501
502
503@node Global Break Condition 505@node Global Break Condition
504@subsubsection Global Break Condition 506@subsubsection Global Break Condition
505 507
@@ -515,7 +517,9 @@ evaluating the condition gets an error, execution does not stop.
515@findex edebug-set-global-break-condition 517@findex edebug-set-global-break-condition
516 The condition expression is stored in 518 The condition expression is stored in
517@code{edebug-global-break-condition}. You can specify a new expression 519@code{edebug-global-break-condition}. You can specify a new expression
518using the @kbd{X} command (@code{edebug-set-global-break-condition}). 520using the @kbd{X} command from the source code buffer while Edebug is
521active, or using @kbd{C-x X X} from any buffer at any time, as long as
522Edebug is loaded (@code{edebug-set-global-break-condition}).
519 523
520 The global break condition is the simplest way to find where in your 524 The global break condition is the simplest way to find where in your
521code some event occurs, but it makes code run much more slowly. So you 525code some event occurs, but it makes code run much more slowly. So you
@@ -582,13 +586,14 @@ effect outside of Edebug.
582 586
583@table @kbd 587@table @kbd
584@item v 588@item v
585Temporarily view the outside window configuration 589View the outside window configuration (@code{edebug-view-outside}).
586(@code{edebug-view-outside}). 590Type @kbd{C-x X w} to return to Edebug.
587 591
588@item p 592@item p
589Temporarily display the outside current buffer with point at its outside 593Temporarily display the outside current buffer with point at its
590position (@code{edebug-bounce-point}). With a prefix argument @var{n}, 594outside position (@code{edebug-bounce-point}), pausing for one second
591pause for @var{n} seconds instead. 595before returning to Edebug. With a prefix argument @var{n}, pause for
596@var{n} seconds instead.
592 597
593@item w 598@item w
594Move point back to the current stop point in the source code buffer 599Move point back to the current stop point in the source code buffer
@@ -610,8 +615,12 @@ source code buffer, you must use @kbd{C-x X W} from the global keymap.
610 615
611 You can view the outside window configuration with @kbd{v} or just 616 You can view the outside window configuration with @kbd{v} or just
612bounce to the point in the current buffer with @kbd{p}, even if 617bounce to the point in the current buffer with @kbd{p}, even if
613it is not normally displayed. After moving point, you may wish to jump 618it is not normally displayed.
614back to the stop point with @kbd{w} from a source code buffer. 619
620 After moving point, you may wish to jump back to the stop point.
621You can do that with @kbd{w} from a source code buffer. You can jump
622back to the stop point in the source code buffer from any buffer using
623@kbd{C-x X w}.
615 624
616 Each time you use @kbd{W} to turn saving @emph{off}, Edebug forgets the 625 Each time you use @kbd{W} to turn saving @emph{off}, Edebug forgets the
617saved outside window configuration---so that even if you turn saving 626saved outside window configuration---so that even if you turn saving
@@ -838,8 +847,9 @@ redefining the functions @code{edebug-print-trace-before} and
838@defmac edebug-tracing string body@dots{} 847@defmac edebug-tracing string body@dots{}
839This macro requests additional trace information around the execution 848This macro requests additional trace information around the execution
840of the @var{body} forms. The argument @var{string} specifies text 849of the @var{body} forms. The argument @var{string} specifies text
841to put in the trace buffer. All the arguments are evaluated, and 850to put in the trace buffer, after the @samp{@{} or @samp{@}}. All
842@code{edebug-tracing} returns the value of the last form in @var{body}. 851the arguments are evaluated, and @code{edebug-tracing} returns the
852value of the last form in @var{body}.
843@end defmac 853@end defmac
844 854
845@defun edebug-trace format-string &rest format-args 855@defun edebug-trace format-string &rest format-args
@@ -990,7 +1000,7 @@ current buffer, are saved and restored.
990@item 1000@item
991@cindex window configuration (Edebug) 1001@cindex window configuration (Edebug)
992The outside window configuration is saved and restored if 1002The outside window configuration is saved and restored if
993@code{edebug-save-windows} is non-@code{nil} (@pxref{Edebug Display Update}). 1003@code{edebug-save-windows} is non-@code{nil} (@pxref{Edebug Options}).
994 1004
995The window configuration is not restored on error or quit, but the 1005The window configuration is not restored on error or quit, but the
996outside selected window @emph{is} reselected even on error or quit in 1006outside selected window @emph{is} reselected even on error or quit in
@@ -1061,8 +1071,21 @@ Edebug is active, @code{defining-kbd-macro} is bound to
1061@code{edebug-continue-kbd-macro}. 1071@code{edebug-continue-kbd-macro}.
1062@end itemize 1072@end itemize
1063 1073
1074@node Edebug and Macros
1075@subsection Edebug and Macros
1076
1077To make Edebug properly instrument expressions that call macros, some
1078extra care is needed. This subsection explains the details.
1079
1080@menu
1081* Instrumenting Macro Calls:: The basic problem.
1082* Specification List:: How to specify complex patterns of evaluation.
1083* Backtracking:: What Edebug does when matching fails.
1084* Specification Examples:: To help understand specifications.
1085@end menu
1086
1064@node Instrumenting Macro Calls 1087@node Instrumenting Macro Calls
1065@subsection Instrumenting Macro Calls 1088@subsubsection Instrumenting Macro Calls
1066 1089
1067 When Edebug instruments an expression that calls a Lisp macro, it needs 1090 When Edebug instruments an expression that calls a Lisp macro, it needs
1068additional information about the macro to do the job properly. This is 1091additional information about the macro to do the job properly. This is
@@ -1101,7 +1124,7 @@ define Edebug specifications for special forms implemented in C.
1101@deffn Macro def-edebug-spec macro specification 1124@deffn Macro def-edebug-spec macro specification
1102Specify which expressions of a call to macro @var{macro} are forms to be 1125Specify which expressions of a call to macro @var{macro} are forms to be
1103evaluated. @var{specification} should be the edebug specification. 1126evaluated. @var{specification} should be the edebug specification.
1104It is not evaluated. 1127Neither argument is evaluated.
1105 1128
1106The @var{macro} argument can actually be any symbol, not just a macro 1129The @var{macro} argument can actually be any symbol, not just a macro
1107name. 1130name.
@@ -1128,12 +1151,12 @@ calling form. The possible elements of a specification list are
1128described in the following sections. 1151described in the following sections.
1129@end table 1152@end table
1130 1153
1131@menu 1154@vindex edebug-eval-macro-args
1132* Specification List:: How to specify complex patterns of evaluation. 1155If a macro has no Edebug specification, neither through a @code{debug}
1133* Backtracking:: What Edebug does when matching fails. 1156declaration nor through a @code{def-edebug-spec} call, the variable
1134* Specification Examples:: To help understand specifications. 1157@code{edebug-eval-macro-args} comes into play. If it is @code{nil},
1135@end menu 1158the default, none of the arguments is instrumented for evaluation.
1136 1159If it is non-@code{nil}, all arguments are instrumented.
1137 1160
1138@node Specification List 1161@node Specification List
1139@subsubsection Specification List 1162@subsubsection Specification List
@@ -1406,7 +1429,7 @@ inside of the sublist to prevent backtracking once a sublist is found.
1406Edebug uses the following specifications for @code{defun} and 1429Edebug uses the following specifications for @code{defun} and
1407@code{defmacro} and the associated argument list and @code{interactive} 1430@code{defmacro} and the associated argument list and @code{interactive}
1408specifications. It is necessary to handle interactive forms specially 1431specifications. It is necessary to handle interactive forms specially
1409since an expression argument it is actually evaluated outside of the 1432since an expression argument is actually evaluated outside of the
1410function body. 1433function body.
1411 1434
1412@smallexample 1435@smallexample
diff --git a/lispref/elisp.texi b/lispref/elisp.texi
index 7a19f8a47da..4be680969a1 100644
--- a/lispref/elisp.texi
+++ b/lispref/elisp.texi
@@ -4,8 +4,10 @@
4@settitle GNU Emacs Lisp Reference Manual 4@settitle GNU Emacs Lisp Reference Manual
5@c %**end of header 5@c %**end of header
6 6
7@c Versino of the manual. 7@c Version of the manual and of Emacs.
8@set VERSION 2.9 8@c Please remember to update the edition number in README as well.
9@set VERSION 2.9
10@set EMACSVER 22.0.50
9 11
10@dircategory Emacs 12@dircategory Emacs
11@direntry 13@direntry
@@ -26,9 +28,7 @@
26 28
27@ifnottex 29@ifnottex
28This Info file contains edition @value{VERSION} of the GNU Emacs Lisp 30This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
29Reference Manual, corresponding to Emacs version 22.1. 31Reference Manual, corresponding to Emacs version @value{EMACSVER}.
30@c Please REMEMBER to update edition number in *four* places in this file
31@c and also in *one* place in intro.texi and *one* in README.
32 32
33Published by the Free Software Foundation 33Published by the Free Software Foundation
3459 Temple Place, Suite 330 3459 Temple Place, Suite 330
@@ -52,9 +52,7 @@ Software Foundation raise funds for GNU development.''
52 52
53@titlepage 53@titlepage
54@title GNU Emacs Lisp Reference Manual 54@title GNU Emacs Lisp Reference Manual
55@subtitle For Emacs Version 22 55@subtitle For Emacs Version @value{EMACSVER}
56@c The edition number appears in several places in this file
57@c and also in the file intro.texi.
58@subtitle Revision @value{VERSION}, January 2002 56@subtitle Revision @value{VERSION}, January 2002
59 57
60@author by Bil Lewis, Dan LaLiberte, Richard Stallman 58@author by Bil Lewis, Dan LaLiberte, Richard Stallman
@@ -66,7 +64,7 @@ Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
66 64
67@sp 2 65@sp 2
68Edition @value{VERSION} @* 66Edition @value{VERSION} @*
69Revised for Emacs Version 22.1,@* 67Revised for Emacs Version @value{EMACSVER},@*
70January 2002.@* 68January 2002.@*
71@sp 2 69@sp 2
72ISBN 1-882114-73-6 70ISBN 1-882114-73-6
@@ -92,11 +90,12 @@ Cover art by Etienne Suvasa.
92@end titlepage 90@end titlepage
93@page 91@page
94 92
93@ifnottex
95@node Top, Introduction, (dir), (dir) 94@node Top, Introduction, (dir), (dir)
95@top Emacs Lisp
96 96
97@ifnottex
98This Info file contains edition @value{VERSION} of the GNU Emacs Lisp 97This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
99Reference Manual, corresponding to GNU Emacs version 22.1. 98Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
100@end ifnottex 99@end ifnottex
101 100
102@menu 101@menu
@@ -156,7 +155,7 @@ Reference Manual, corresponding to GNU Emacs version 22.1.
156 155
157Appendices 156Appendices
158 157
159* Antinews:: Info for users downgrading to Emacs 20. 158* Antinews:: Info for users downgrading to Emacs 21.
160* GNU Free Documentation License:: The license for this documentation 159* GNU Free Documentation License:: The license for this documentation
161* GPL:: Conditions for copying and changing GNU Emacs. 160* GPL:: Conditions for copying and changing GNU Emacs.
162* Tips:: Advice and coding conventions for Emacs Lisp. 161* Tips:: Advice and coding conventions for Emacs Lisp.
@@ -171,9 +170,10 @@ Appendices
171* Index:: Index including concepts, functions, variables, 170* Index:: Index including concepts, functions, variables,
172 and other terms. 171 and other terms.
173 172
174* New Symbols:: New functions and variables in Emacs 22. 173* New Symbols:: New functions and variables in Emacs @value{EMACSVER}.
175 174
176 --- The Detailed Node Listing --- 175Detailed Node Listing
176---------------------
177 177
178Here are other nodes that are inferiors of those already listed, 178Here are other nodes that are inferiors of those already listed,
179mentioned here so you can get to them in one step: 179mentioned here so you can get to them in one step:
@@ -514,7 +514,7 @@ Edebug
514* Edebug Execution Modes:: Execution modes, stopping more or less often. 514* Edebug Execution Modes:: Execution modes, stopping more or less often.
515* Jumping:: Commands to jump to a specified place. 515* Jumping:: Commands to jump to a specified place.
516* Edebug Misc:: Miscellaneous commands. 516* Edebug Misc:: Miscellaneous commands.
517* Breakpoints:: Setting breakpoints to make the program stop. 517* Breaks:: Setting breakpoints to make the program stop.
518* Trapping Errors:: Trapping errors with Edebug. 518* Trapping Errors:: Trapping errors with Edebug.
519* Edebug Views:: Views inside and outside of Edebug. 519* Edebug Views:: Views inside and outside of Edebug.
520* Edebug Eval:: Evaluating expressions within Edebug. 520* Edebug Eval:: Evaluating expressions within Edebug.
@@ -524,7 +524,7 @@ Edebug
524* Trace Buffer:: How to produce trace output in a buffer. 524* Trace Buffer:: How to produce trace output in a buffer.
525* Coverage Testing:: How to test evaluation coverage. 525* Coverage Testing:: How to test evaluation coverage.
526* The Outside Context:: Data that Edebug saves and restores. 526* The Outside Context:: Data that Edebug saves and restores.
527* Instrumenting Macro Calls:: Specifying how to handle macro calls. 527* Edebug and Macros:: Specifying how to handle macro calls.
528* Edebug Options:: Option variables for customizing Edebug. 528* Edebug Options:: Option variables for customizing Edebug.
529 529
530Debugging Invalid Lisp Syntax 530Debugging Invalid Lisp Syntax
diff --git a/lispref/intro.texi b/lispref/intro.texi
index 999db7ad722..bb264c81c46 100644
--- a/lispref/intro.texi
+++ b/lispref/intro.texi
@@ -5,9 +5,6 @@
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/intro 6@setfilename ../info/intro
7 7
8@c Versino of the manual.
9@set VERSION 2.9
10
11@node Introduction, Lisp Data Types, Top, Top 8@node Introduction, Lisp Data Types, Top, Top
12@comment node-name, next, previous, up 9@comment node-name, next, previous, up
13@chapter Introduction 10@chapter Introduction
@@ -38,7 +35,8 @@ Lisp that have counterparts in many programming languages, and later
38chapters describe features that are peculiar to Emacs Lisp or relate 35chapters describe features that are peculiar to Emacs Lisp or relate
39specifically to editing. 36specifically to editing.
40 37
41 This is edition @value{VERSION}. 38 This is edition @value{VERSION} of the GNU Emacs Lisp Reference
39Manual, corresponding to Emacs version @value{EMACSVER}.
42 40
43@menu 41@menu
44* Caveats:: Flaws and a request for help. 42* Caveats:: Flaws and a request for help.
diff --git a/lispref/modes.texi b/lispref/modes.texi
index f8c1ae82a4e..2366fca5b96 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -1650,13 +1650,13 @@ properties specified by @var{props} to the result. The argument
1650@var{value}. (This feature is new as of Emacs 22.1.) 1650@var{value}. (This feature is new as of Emacs 22.1.)
1651 1651
1652@item (@var{symbol} @var{then} @var{else}) 1652@item (@var{symbol} @var{then} @var{else})
1653A list whose first element is a symbol that is not a keyword specifies a 1653A list whose first element is a symbol that is not a keyword specifies
1654conditional. Its meaning depends on the value of @var{symbol}. If the 1654a conditional. Its meaning depends on the value of @var{symbol}. If
1655value is non-@code{nil}, the second element, @var{then}, is processed 1655@var{symbol} has a non-@code{nil} value, the second element,
1656recursively as a mode-line element. But if the value of @var{symbol} is 1656@var{then}, is processed recursively as a mode-line element.
1657@code{nil}, the third element, @var{else}, is processed recursively. 1657Otherwise, the third element, @var{else}, is processed recursively.
1658You may omit @var{else}; then the mode-line element displays nothing if 1658You may omit @var{else}; then the mode-line element displays nothing
1659the value of @var{symbol} is @code{nil}. 1659if the value of @var{symbol} is @code{nil} or void.
1660 1660
1661@item (@var{width} @var{rest}@dots{}) 1661@item (@var{width} @var{rest}@dots{})
1662A list whose first element is an integer specifies truncation or 1662A list whose first element is an integer specifies truncation or
@@ -2319,6 +2319,7 @@ Search-based fontification happens second.
2319@menu 2319@menu
2320* Font Lock Basics:: Overview of customizing Font Lock. 2320* Font Lock Basics:: Overview of customizing Font Lock.
2321* Search-based Fontification:: Fontification based on regexps. 2321* Search-based Fontification:: Fontification based on regexps.
2322* Customizing Keywords:: Customizing search-based fontification.
2322* Other Font Lock Variables:: Additional customization facilities. 2323* Other Font Lock Variables:: Additional customization facilities.
2323* Levels of Font Lock:: Each mode can define alternative levels 2324* Levels of Font Lock:: Each mode can define alternative levels
2324 so that the user can select more or less. 2325 so that the user can select more or less.
@@ -2624,19 +2625,27 @@ Non-@code{nil} means that regular expression matching for the sake of
2624@code{font-lock-keywords} should be case-insensitive. 2625@code{font-lock-keywords} should be case-insensitive.
2625@end defvar 2626@end defvar
2626 2627
2627You can use @code{font-lock-add-keywords} to add additional 2628@node Customizing Keywords
2629@subsection Customizing Search-Based Fontification
2630
2631 You can use @code{font-lock-add-keywords} to add additional
2628search-based fontification rules to a major mode, and 2632search-based fontification rules to a major mode, and
2629@code{font-lock-remove-keywords} to removes rules. 2633@code{font-lock-remove-keywords} to removes rules.
2630 2634
2631@defun font-lock-add-keywords mode keywords &optional append 2635@defun font-lock-add-keywords mode keywords &optional append
2632This function adds highlighting @var{keywords} for @var{mode}. The 2636This function adds highlighting @var{keywords}, for the current buffer
2633argument @var{keywords} should be a list with the same format as the 2637or for major mode @var{mode}. The argument @var{keywords} should be a
2634variable @code{font-lock-keywords}. @var{mode} should be a symbol, 2638list with the same format as the variable @code{font-lock-keywords}.
2635the major mode command name, such as @code{c-mode}. When Font Lock 2639
2636mode is turned on in @var{mode}, it adds @var{keywords} to 2640If @var{mode} is a symbol which is a major mode command name, such as
2637@code{font-lock-keywords}. @var{mode} can also be @code{nil}; the 2641@code{c-mode}, the effect is that enabling Font Lock mode in
2638highlighting @var{keywords} are immediately added to 2642@var{mode} will add @var{keywords} to @code{font-lock-keywords}.
2639@code{font-lock-keywords} in the current buffer in that case. 2643Calling with a non-@code{nil} value of @var{mode} is correct only in
2644your @file{~/.emacs} file.
2645
2646If @var{mode} is @code{nil}, this function adds @var{keywords} to
2647@code{font-lock-keywords} in the current buffer. This way of calling
2648@code{font-lock-add-keywords} is usually used in mode hook functions.
2640 2649
2641By default, @var{keywords} are added at the beginning of 2650By default, @var{keywords} are added at the beginning of
2642@code{font-lock-keywords}. If the optional argument @var{append} is 2651@code{font-lock-keywords}. If the optional argument @var{append} is
@@ -2645,7 +2654,29 @@ By default, @var{keywords} are added at the beginning of
2645non-@code{nil} value, they are added at the end of 2654non-@code{nil} value, they are added at the end of
2646@code{font-lock-keywords}. 2655@code{font-lock-keywords}.
2647 2656
2648For example: 2657Some modes provide specialized support you can use in additional
2658highlighting patterns. See the variables
2659@code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types},
2660@code{objc-font-lock-extra-types} and
2661@code{java-font-lock-extra-types}, for example.
2662
2663@strong{Warning:} major mode functions must not call
2664@code{font-lock-add-keywords} under any circumstances, either directly
2665or indirectly, except through their mode hooks. (Doing so would lead
2666to incorrect behavior for some minor modes.) They should set up their
2667rules for search-based fontification by setting
2668@code{font-lock-keywords}.
2669@end defun
2670
2671@defun font-lock-remove-keywords mode keywords
2672This function removes @var{keywords} from @code{font-lock-keywords}
2673for the current buffer or for major mode @var{mode}. As in
2674@code{font-lock-add-keywords}, @var{mode} should be a major mode
2675command name or @code{nil}. All the caveats and requirments for
2676@code{font-lock-add-keywords} apply here too.
2677@end defun
2678
2679 For example, this code
2649 2680
2650@smallexample 2681@smallexample
2651(font-lock-add-keywords 'c-mode 2682(font-lock-add-keywords 'c-mode
@@ -2653,30 +2684,23 @@ For example:
2653 ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face))) 2684 ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))
2654@end smallexample 2685@end smallexample
2655 2686
2687@noindent
2656adds two fontification patterns for C mode: one to fontify the word 2688adds two fontification patterns for C mode: one to fontify the word
2657@samp{FIXME}, even in comments, and another to fontify the words 2689@samp{FIXME}, even in comments, and another to fontify the words
2658@samp{and}, @samp{or} and @samp{not} as keywords. 2690@samp{and}, @samp{or} and @samp{not} as keywords.
2659 2691
2660Some modes have specialized support for additional patterns. See the 2692@noindent
2661variables @code{c-font-lock-extra-types}, 2693That example affects only C mode proper. To add the same patterns to
2662@code{c++-font-lock-extra-types}, @code{objc-font-lock-extra-types} 2694C mode @emph{and} all modes derived from it, do this instead:
2663and @code{java-font-lock-extra-types}, for example.
2664@end defun
2665
2666@defun font-lock-remove-keywords mode keywords
2667This function removes highlighting @var{keywords} for @var{mode}. As
2668in @code{font-lock-add-keywords}, @var{mode} should be a major mode
2669command name or @code{nil}. If @code{nil}, the highlighting
2670@var{keywords} are immediately removed in the current buffer.
2671@end defun
2672 2695
2673@strong{Warning:} Only use a non-@code{nil} @var{mode} argument when 2696@smallexample
2674you use @code{font-lock-add-keywords} or 2697(add-hook 'c-mode-hook
2675@code{font-lock-remove-keywords} in your @file{.emacs} file. When you 2698 (lambda ()
2676use these functions from a Lisp program (such as a minor mode), we 2699 (font-lock-add-keywords nil
2677recommend that you use @code{nil} for @var{mode} (and place the call 2700 '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)
2678on a hook) to avoid subtle problems due to the details of the 2701 ("\\<\\(and\\|or\\|not\\)\\>" .
2679implementation. 2702 font-lock-keyword-face)))))
2703@end smallexample
2680 2704
2681@node Other Font Lock Variables 2705@node Other Font Lock Variables
2682@subsection Other Font Lock Variables 2706@subsection Other Font Lock Variables
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 1f4a82d3f1f..15037068dd2 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -1485,13 +1485,14 @@ character of the buffer counts as 1.)
1485 The functions @code{match-data} and @code{set-match-data} read or 1485 The functions @code{match-data} and @code{set-match-data} read or
1486write the entire match data, all at once. 1486write the entire match data, all at once.
1487 1487
1488@defun match-data &optional integers reuse 1488@defun match-data &optional integers reuse reseat
1489This function returns a newly constructed list containing all the 1489This function returns a list of positions (markers or integers) that
1490information on what text the last search matched. Element zero is the 1490record all the information on what text the last search matched.
1491position of the beginning of the match for the whole expression; element 1491Element zero is the position of the beginning of the match for the
1492one is the position of the end of the match for the expression. The 1492whole expression; element one is the position of the end of the match
1493next two elements are the positions of the beginning and end of the 1493for the expression. The next two elements are the positions of the
1494match for the first subexpression, and so on. In general, element 1494beginning and end of the match for the first subexpression, and so on.
1495In general, element
1495@ifnottex 1496@ifnottex
1496number 2@var{n} 1497number 2@var{n}
1497@end ifnottex 1498@end ifnottex
@@ -1508,15 +1509,13 @@ number {\mathsurround=0pt $2n+1$}
1508@end tex 1509@end tex
1509corresponds to @code{(match-end @var{n})}. 1510corresponds to @code{(match-end @var{n})}.
1510 1511
1511All the elements are markers or @code{nil} if matching was done on a 1512Normally all the elements are markers or @code{nil}, but if
1512buffer and all are integers or @code{nil} if matching was done on a 1513@var{integers} is non-@code{nil}, that means to use integers instead
1513string with @code{string-match}. If @var{integers} is 1514of markers. (In that case, the buffer itself is appended as an
1514non-@code{nil}, then the elements are integers or @code{nil}, even if 1515additional element at the end of the list, to facilitate complete
1515matching was done on a buffer. In that case, the buffer itself is 1516restoration of the match data.) If the last match was done on a
1516appended as an additional element at the end of the list 1517string with @code{string-match}, then integers are always used,
1517to facilitate complete restoration of the match data. Also, 1518since markers can't point into a string.
1518@code{match-beginning} and
1519@code{match-end} always return integers or @code{nil}.
1520 1519
1521If @var{reuse} is non-@code{nil}, it should be a list. In that case, 1520If @var{reuse} is non-@code{nil}, it should be a list. In that case,
1522@code{match-data} stores the match data in @var{reuse}. That is, 1521@code{match-data} stores the match data in @var{reuse}. That is,
@@ -1524,8 +1523,16 @@ If @var{reuse} is non-@code{nil}, it should be a list. In that case,
1524have the right length. If it is not long enough to contain the match 1523have the right length. If it is not long enough to contain the match
1525data, it is extended. If it is too long, the length of @var{reuse} 1524data, it is extended. If it is too long, the length of @var{reuse}
1526stays the same, but the elements that were not used are set to 1525stays the same, but the elements that were not used are set to
1527@code{nil}. The purpose of this feature is to avoid producing too 1526@code{nil}. The purpose of this feature is to reduce the need for
1528much garbage, that would later have to be collected. 1527garbage collection.
1528
1529If @var{reseat} is non-@code{nil}, all markers on the @var{reuse} list
1530are reseated to point to nowhere, and if the value is @code{evaporate},
1531the markers are put back on the free list.
1532
1533@strong{Warning:} When @code{evaporate} is specified for @var{reseat},
1534no other references to the markers on the @var{reuse} list; otherwise,
1535Emacs may crash during the next garbage collection.
1529 1536
1530As always, there must be no possibility of intervening searches between 1537As always, there must be no possibility of intervening searches between
1531the call to a search function and the call to @code{match-data} that is 1538the call to a search function and the call to @code{match-data} that is
@@ -1542,7 +1549,7 @@ intended to access the match data for that search.
1542@end example 1549@end example
1543@end defun 1550@end defun
1544 1551
1545@defun set-match-data match-list 1552@defun set-match-data match-list &optional reseat
1546This function sets the match data from the elements of @var{match-list}, 1553This function sets the match data from the elements of @var{match-list},
1547which should be a list that was the value of a previous call to 1554which should be a list that was the value of a previous call to
1548@code{match-data}. (More precisely, anything that has the same format 1555@code{match-data}. (More precisely, anything that has the same format
@@ -1551,6 +1558,14 @@ will work.)
1551If @var{match-list} refers to a buffer that doesn't exist, you don't get 1558If @var{match-list} refers to a buffer that doesn't exist, you don't get
1552an error; that sets the match data in a meaningless but harmless way. 1559an error; that sets the match data in a meaningless but harmless way.
1553 1560
1561If @var{reseat} is non-@code{nil}, all markers on the @var{match-list} list
1562are reseated to point to nowhere, and if the value is @code{evaporate},
1563the markers are put back on the free list.
1564
1565@strong{Warning:} When @code{evaporate} is specified for @var{reseat},
1566no other references to the markers on the @var{match-list} list; otherwise,
1567Emacs may crash during the next garbage collection.
1568
1554@findex store-match-data 1569@findex store-match-data
1555@code{store-match-data} is a semi-obsolete alias for @code{set-match-data}. 1570@code{store-match-data} is a semi-obsolete alias for @code{set-match-data}.
1556@end defun 1571@end defun
diff --git a/lispref/syntax.texi b/lispref/syntax.texi
index a9df79e9f57..e8707709fe2 100644
--- a/lispref/syntax.texi
+++ b/lispref/syntax.texi
@@ -256,7 +256,7 @@ English text has no comment characters. In Lisp, the semicolon
256@deffn {Syntax class} @w{inherit} 256@deffn {Syntax class} @w{inherit}
257This syntax class does not specify a particular syntax. It says to look 257This syntax class does not specify a particular syntax. It says to look
258in the standard syntax table to find the syntax of this character. The 258in the standard syntax table to find the syntax of this character. The
259designator for this syntax code is @samp{@@}. 259designator for this syntax class is @samp{@@}.
260@end deffn 260@end deffn
261 261
262@deffn {Syntax class} @w{generic comment delimiter} 262@deffn {Syntax class} @w{generic comment delimiter}
@@ -385,7 +385,7 @@ nestable.
385@samp{p} identifies an additional ``prefix character'' for Lisp syntax. 385@samp{p} identifies an additional ``prefix character'' for Lisp syntax.
386These characters are treated as whitespace when they appear between 386These characters are treated as whitespace when they appear between
387expressions. When they appear within an expression, they are handled 387expressions. When they appear within an expression, they are handled
388according to their usual syntax codes. 388according to their usual syntax classes.
389 389
390The function @code{backward-prefix-chars} moves back over these 390The function @code{backward-prefix-chars} moves back over these
391characters, as well as over characters whose primary syntax class is 391characters, as well as over characters whose primary syntax class is
@@ -566,7 +566,7 @@ have certain syntax classes.
566 566
567@defun skip-syntax-forward syntaxes &optional limit 567@defun skip-syntax-forward syntaxes &optional limit
568This function moves point forward across characters having syntax 568This function moves point forward across characters having syntax
569classes mentioned in @var{syntaxes} (a string of syntax code 569classes mentioned in @var{syntaxes} (a string of syntax class
570characters). It stops when it encounters the end of the buffer, or 570characters). It stops when it encounters the end of the buffer, or
571position @var{limit} (if specified), or a character it is not supposed 571position @var{limit} (if specified), or a character it is not supposed
572to skip. 572to skip.
@@ -730,6 +730,36 @@ This function is most often used to compute indentation for languages
730that have nested parentheses. 730that have nested parentheses.
731@end defun 731@end defun
732 732
733@defun syntax-ppss &optional pos
734This function returns the state that the parser would have at position
735@var{pos}, if it were started with a default start state at the
736beginning of the buffer. Thus, it is equivalent to
737@code{(parse-partial-sexp (point-min) @var{pos})}, except that
738@code{syntax-ppss} uses a cache to speed up the computation. Also,
739the 2nd value (previous complete subexpression) and 6th value (minimum
740parenthesis depth) of the returned state are not meaningful.
741@end defun
742
743@defun syntax-ppss-flush-cache beg
744This function flushes the cache used by @code{syntax-ppss}, starting at
745position @var{beg}.
746
747When @code{syntax-ppss} is called, it automatically hooks itself
748to @code{before-change-functions} to keep its cache consistent.
749But this can fail if @code{syntax-ppss} is called while
750@code{before-change-functions} is temporarily let-bound, or if the
751buffer is modified without obeying the hook, such as when using
752@code{inhibit-modification-hooks}. For this reason, it is sometimes
753necessary to flush the cache manually.
754@end defun
755
756@defvar syntax-begin-function
757If this is non-nil, it should be a function that moves to an earlier
758buffer position where the parser state is equivalent to @code{nil},
759i.e., a position outside of any comment, string, or parenthesis.
760@code{syntax-ppss} uses it to supplement its cache.
761@end defvar
762
733@defun scan-lists from count depth 763@defun scan-lists from count depth
734This function scans forward @var{count} balanced parenthetical groupings 764This function scans forward @var{count} balanced parenthetical groupings
735from position @var{from}. It returns the position where the scan stops. 765from position @var{from}. It returns the position where the scan stops.
@@ -779,7 +809,7 @@ whitespace by the functions in this section and by @code{forward-sexp}.
779@end defopt 809@end defopt
780 810
781@vindex parse-sexp-lookup-properties 811@vindex parse-sexp-lookup-properties
782The behaviour of @code{parse-partial-sexp} is also affected by 812The behavior of @code{parse-partial-sexp} is also affected by
783@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}). 813@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}).
784 814
785You can use @code{forward-comment} to move forward or backward over 815You can use @code{forward-comment} to move forward or backward over
diff --git a/lispref/text.texi b/lispref/text.texi
index 1d4dc0fce8a..cddeeb8fbde 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -1667,8 +1667,12 @@ line won't be broken there.
1667@section Adaptive Fill Mode 1667@section Adaptive Fill Mode
1668@cindex Adaptive Fill mode 1668@cindex Adaptive Fill mode
1669 1669
1670 Adaptive Fill mode chooses a fill prefix automatically from the text 1670 When @dfn{Adaptive Fill Mode} is enabled, Emacs determines the fill
1671in each paragraph being filled. 1671prefix automatically from the text in each paragraph being filled
1672rather than using a predetermined value. During filling, this fill
1673prefix gets inserted at the start of the second and subsequent lines
1674of the paragraph as described in @ref{Filling}, and in @ref{Auto
1675Filling}.
1672 1676
1673@defopt adaptive-fill-mode 1677@defopt adaptive-fill-mode
1674Adaptive Fill mode is enabled when this variable is non-@code{nil}. 1678Adaptive Fill mode is enabled when this variable is non-@code{nil}.
@@ -1677,38 +1681,80 @@ It is @code{t} by default.
1677 1681
1678@defun fill-context-prefix from to 1682@defun fill-context-prefix from to
1679This function implements the heart of Adaptive Fill mode; it chooses a 1683This function implements the heart of Adaptive Fill mode; it chooses a
1680fill prefix based on the text between @var{from} and @var{to}. It does 1684fill prefix based on the text between @var{from} and @var{to},
1681this by looking at the first two lines of the paragraph, based on the 1685typically the start and end of a paragraph. It does this by looking
1682variables described below. 1686at the first two lines of the paragraph, based on the variables
1687described below.
1683@c The optional argument first-line-regexp is not documented 1688@c The optional argument first-line-regexp is not documented
1684@c because it exists for internal purposes and might be eliminated 1689@c because it exists for internal purposes and might be eliminated
1685@c in the future. 1690@c in the future.
1691
1692Usually, this function returns the fill prefix, a string. However,
1693before doing this, the function makes a final check (not specially
1694mentioned in the following) that a line starting with this prefix
1695wouldn't look like the start of a paragraph. Should this happen, the
1696function signals the anomaly by returning @code{nil} instead.
1697
1698In detail, @code{fill-context-prefix} does this:
1699
1700@enumerate
1701@item
1702It takes a candidate for the fill prefix from the first line---it
1703tries first the function in @code{adaptive-fill-function} (if any),
1704then the regular expression @code{adaptive-fill-regexp} (see below).
1705The first non-@code{nil} result of these, or the empty string if
1706they're both @code{nil}, becomes the first line's candidate.
1707@item
1708If the paragraph has as yet only one line, the function tests the
1709validity of the prefix candidate just found. The function then
1710returns the candidate if it's valid, or a string of spaces otherwise.
1711(see the description of @code{adaptive-fill-first-line-regexp} below).
1712@item
1713When the paragraph already has two lines, the function next looks for
1714a prefix candidate on the second line, in just the same way it did for
1715the first line. If it doesn't find one, it returns @code{nil}.
1716@item
1717The function now compares the two candidate prefixes heuristically: if
1718the non-whitespace characters in the line 2 candidate occur in the
1719same order in the line 1 candidate, the function returns the line 2
1720candidate. Otherwise, it returns the largest initial substring which
1721is common to both candidates (which might be the empty string).
1722@end enumerate
1686@end defun 1723@end defun
1687 1724
1688@defopt adaptive-fill-regexp 1725@defopt adaptive-fill-regexp
1689This variable holds a regular expression to control Adaptive Fill mode.
1690Adaptive Fill mode matches this regular expression against the text 1726Adaptive Fill mode matches this regular expression against the text
1691starting after the left margin whitespace (if any) on a line; the 1727starting after the left margin whitespace (if any) on a line; the
1692characters it matches are that line's candidate for the fill prefix. 1728characters it matches are that line's candidate for the fill prefix.
1729
1730The default value of this variable is
1731@w{@samp{"[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"}}. This
1732matches a number enclosed in parentheses or followed by a period,
1733or certain punctuation characters, or any sequence of these
1734intermingled with whitespace. In particular, it matches a sequence of
1735whitespace, possibly empty.
1693@end defopt 1736@end defopt
1694 1737
1695@defopt adaptive-fill-first-line-regexp 1738@defopt adaptive-fill-first-line-regexp
1696In a one-line paragraph, if the candidate fill prefix matches this 1739Used only in one-line paragraphs, this regular expression acts as an
1697regular expression, or if it matches @code{comment-start-skip}, then it 1740additional check of the validity of the one available candidate fill
1698is used---otherwise, spaces amounting to the same width are used 1741prefix: the candidate must match this regular expression, or match
1699instead. 1742@code{comment-start-skip}. If it doesn't, @code{fill-context-prefix}
1700 1743replaces the candidate with a string of spaces ``of the same width''
1701However, the fill prefix is never taken from a one-line paragraph 1744as it.
1702if it would act as a paragraph starter on subsequent lines. 1745
1746The default value of this variable is @w{@samp{"\\`[ \t]*\\'"}}, which
1747matches only a string of whitespace. The effect of this default is to
1748force the fill prefixes found in one-line paragraphs always to be pure
1749whitespace.
1703@end defopt 1750@end defopt
1704 1751
1705@defopt adaptive-fill-function 1752@defopt adaptive-fill-function
1706You can specify more complex ways of choosing a fill prefix 1753You can specify more complex ways of choosing a fill prefix
1707automatically by setting this variable to a function. The function is 1754automatically by setting this variable to a function. The function is
1708called when @code{adaptive-fill-regexp} does not match, with point after 1755called with point after the left margin (if any) of a line, and it
1709the left margin of a line, and it should return the appropriate fill 1756must preserve point. It should return either ``that line's'' fill
1710prefix based on that line. If it returns @code{nil}, that means it sees 1757prefix or @code{nil}, meaning it has failed to determine a prefix.
1711no fill prefix in that line.
1712@end defopt 1758@end defopt
1713 1759
1714@node Auto Filling 1760@node Auto Filling
@@ -3078,8 +3124,8 @@ that character a non-@code{nil} @var{cursor} text property.
3078@item pointer 3124@item pointer
3079@kindex pointer @r{(text property)} 3125@kindex pointer @r{(text property)}
3080This specifies a specific pointer shape when the mouse pointer is over 3126This specifies a specific pointer shape when the mouse pointer is over
3081this text or image. See the variable @var{void-area-text-pointer} 3127this text or image. @xref{Pointer Shape}, for possible pointer
3082for possible pointer shapes. 3128shapes.
3083 3129
3084@item line-spacing 3130@item line-spacing
3085@kindex line-spacing @r{(text property)} 3131@kindex line-spacing @r{(text property)}