aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog15
-rw-r--r--doc/lispref/control.texi13
-rw-r--r--doc/lispref/debugging.texi29
-rw-r--r--doc/lispref/errors.texi3
-rw-r--r--doc/lispref/variables.texi34
5 files changed, 71 insertions, 23 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7eb75ceac55..6d6ddf4da9a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,18 @@
12012-11-13 Glenn Morris <rgm@gnu.org>
2
3 * variables.texi (Adding Generalized Variables):
4 At least mention gv-define-expander and gv-letplace.
5
6 * debugging.texi (Error Debugging): Mention debug-on-message.
7 (Using Debugger): Mention debugger-bury-or-kill.
8
9 * control.texi (Signaling Errors):
10 * debugging.texi (Error Debugging):
11 * errors.texi (Standard Errors): Add user-error.
12
13 * variables.texi (Adding Generalized Variables):
14 Use standard formatting for common lisp note about setf functions.
15
12012-11-10 Martin Rudalics <rudalics@gmx.at> 162012-11-10 Martin Rudalics <rudalics@gmx.at>
2 17
3 * elisp.texi (Top): Add Recombining Windows to menu. 18 * elisp.texi (Top): Add Recombining Windows to menu.
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index cf393b59c49..489e5cc5b22 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -824,6 +824,19 @@ The function @code{signal} never returns.
824@end example 824@end example
825@end defun 825@end defun
826 826
827@cindex user errors, signaling
828@defun user-error format-string &rest args
829This function behaves exactly like @code{error}, except that it uses
830the error symbol @code{user-error} rather than @code{error}. As the
831name suggests, this is intended to report errors on the part of the
832user, rather than errors in the code itself. For example,
833if you try to use the command @code{Info-history-back} (@kbd{l}) to
834move back beyond the start of your Info browsing history, Emacs
835signals a @code{user-error}. Such errors do not cause entry to the
836debugger, even when @code{debug-on-error} is non-@code{nil}.
837@xref{Error Debugging}.
838@end defun
839
827@cindex CL note---no continuable errors 840@cindex CL note---no continuable errors
828@quotation 841@quotation
829@b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp 842@b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 2226db942d1..11532b19781 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -117,12 +117,12 @@ has any of those condition symbols, or if the error message matches
117any of the regular expressions, then that error does not enter the 117any of the regular expressions, then that error does not enter the
118debugger. 118debugger.
119 119
120The normal value of this variable lists several errors that happen 120The normal value of this variable includes @code{user-error}, as well
121often during editing but rarely result from bugs in Lisp programs. 121as several errors that happen often during editing but rarely result
122However, ``rarely'' is not ``never''; if your program fails with an 122from bugs in Lisp programs. However, ``rarely'' is not ``never''; if
123error that matches this list, you may try changing this list to debug 123your program fails with an error that matches this list, you may try
124the error. The easiest way is usually to set 124changing this list to debug the error. The easiest way is usually to
125@code{debug-ignored-errors} to @code{nil}. 125set @code{debug-ignored-errors} to @code{nil}.
126@end defopt 126@end defopt
127 127
128@defopt eval-expression-debug-on-error 128@defopt eval-expression-debug-on-error
@@ -163,6 +163,14 @@ supported values correspond to the signals @code{SIGUSR1} and
163@code{inhibit-quit} is set and Emacs is not otherwise responding. 163@code{inhibit-quit} is set and Emacs is not otherwise responding.
164@end defopt 164@end defopt
165 165
166@cindex message, finding what causes a particular message
167@defvar debug-on-message
168If you set @code{debug-on-message} to a regular expression,
169Emacs will enter the debugger if it displays a matching message in the
170echo area. For example, this can be useful when trying to find the
171cause of a particular message.
172@end defvar
173
166 To debug an error that happens during loading of the init 174 To debug an error that happens during loading of the init
167file, use the option @samp{--debug-init}. This binds 175file, use the option @samp{--debug-init}. This binds
168@code{debug-on-error} to @code{t} while loading the init file, and 176@code{debug-on-error} to @code{t} while loading the init file, and
@@ -314,6 +322,7 @@ is a message describing the reason that the debugger was invoked (such
314as the error message and associated data, if it was invoked due to an 322as the error message and associated data, if it was invoked due to an
315error). 323error).
316 324
325@vindex debugger-bury-or-kill
317 The backtrace buffer is read-only and uses a special major mode, 326 The backtrace buffer is read-only and uses a special major mode,
318Debugger mode, in which letters are defined as debugger commands. The 327Debugger mode, in which letters are defined as debugger commands. The
319usual Emacs editing commands are available; thus, you can switch windows 328usual Emacs editing commands are available; thus, you can switch windows
@@ -322,8 +331,12 @@ switch buffers, visit files, or do any other sort of editing. However,
322the debugger is a recursive editing level (@pxref{Recursive Editing}) 331the debugger is a recursive editing level (@pxref{Recursive Editing})
323and it is wise to go back to the backtrace buffer and exit the debugger 332and it is wise to go back to the backtrace buffer and exit the debugger
324(with the @kbd{q} command) when you are finished with it. Exiting 333(with the @kbd{q} command) when you are finished with it. Exiting
325the debugger gets out of the recursive edit and kills the backtrace 334the debugger gets out of the recursive edit and buries the backtrace
326buffer. 335buffer. (You can customize what the @kbd{q} command does with the
336backtrace buffer by setting the variable @code{debugger-bury-or-kill}.
337For example, set it to @code{kill} if you prefer to kill the buffer
338rather than bury it. Consult the variable's documentation for more
339possibilities.)
327 340
328 When the debugger has been entered, the @code{debug-on-error} 341 When the debugger has been entered, the @code{debug-on-error}
329variable is temporarily set according to 342variable is temporarily set according to
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index a57f74d6c86..b92fd9ed665 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -172,6 +172,9 @@ The message is @samp{Text is read-only}. This is a subcategory of
172@item undefined-color 172@item undefined-color
173The message is @samp{Undefined color}. @xref{Color Names}. 173The message is @samp{Undefined color}. @xref{Color Names}.
174 174
175@item user-error
176The message is the empty string. @xref{Signaling Errors}.
177
175@item void-function 178@item void-function
176The message is @samp{Symbol's function definition is void}. 179The message is @samp{Symbol's function definition is void}.
177@xref{Function Cells}. 180@xref{Function Cells}.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index c8451527d4f..dfde3c45c04 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -2133,20 +2133,24 @@ set. An example of using this macro is:
2133@end example 2133@end example
2134@end defmac 2134@end defmac
2135 2135
2136@c FIXME? Not sure what, if anything, to say about this. 2136@findex gv-define-expander
2137@ignore 2137@findex gv-letplace
2138@defmac gv-define-expander name handler 2138@c FIXME? Not sure what or how much to say about these.
2139This is the most general way to define a new @code{setf} expansion. 2139@c See cl.texi for an example of using gv-letplace.
2140@end defmac 2140For more control over the expansion, see the macro @code{gv-define-expander}.
2141@end ignore 2141The macro @code{gv-letplace} can be useful in defining macros that
2142perform similarly to @code{setf}; for example, the @code{incf} macro
2143of Common Lisp. Consult the source file @file{gv.el} for more details.
2142 2144
2143@cindex CL note---no @code{setf} functions 2145@cindex CL note---no @code{setf} functions
2144Common Lisp defines another way to specify the @code{setf} behavior of 2146@quotation
2145a function, namely ``@code{setf} functions'', whose names are lists 2147@b{Common Lisp note:} Common Lisp defines another way to specify the
2146@code{(setf @var{name})} rather than symbols. For example, 2148@code{setf} behavior of a function, namely ``@code{setf} functions'',
2147@code{(defun (setf foo) @dots{})} defines the function that is used 2149whose names are lists @code{(setf @var{name})} rather than symbols.
2148when @code{setf} is applied to @code{foo}. Emacs does not support 2150For example, @code{(defun (setf foo) @dots{})} defines the function
2149this. It is a compile-time error to use @code{setf} on a form that 2151that is used when @code{setf} is applied to @code{foo}. Emacs does
2150has not already had an appropriate expansion defined. In Common Lisp, 2152not support this. It is a compile-time error to use @code{setf} on a
2151this is not an error since the function @code{(setf @var{func})} might 2153form that has not already had an appropriate expansion defined. In
2152be defined later. 2154Common Lisp, this is not an error since the function @code{(setf
2155@var{func})} might be defined later.
2156@end quotation