aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog19
-rw-r--r--lispref/control.texi49
-rw-r--r--lispref/display.texi5
-rw-r--r--lispref/files.texi9
4 files changed, 64 insertions, 18 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 5c25f0945a9..5102e723566 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,6 +1,23 @@
12007-07-14 Richard Stallman <rms@gnu.org>
2
3 * control.texi (Handling Errors): Document `debug' in handler list.
4
52007-07-10 Richard Stallman <rms@gnu.org>
6
7 * display.texi (Defining Faces): Explain C-M-x feature for defface.
8
92007-07-09 Richard Stallman <rms@gnu.org>
10
11 * files.texi (Magic File Names): Rewrite previous change.
12
132007-07-08 Michael Albinus <michael.albinus@gmx.de>
14
15 * files.texi (Magic File Names): Introduce optional parameter
16 CONNECTED for `file-remote-p'.
17
12007-07-07 Michael Albinus <michael.albinus@gmx.de> 182007-07-07 Michael Albinus <michael.albinus@gmx.de>
2 19
3 * process.texi (Asynchronous Processes): 20 * processes.texi (Asynchronous Processes):
4 * files.texi (Magic File Names): Add `start-file-process'. 21 * files.texi (Magic File Names): Add `start-file-process'.
5 22
62007-06-27 Richard Stallman <rms@gnu.org> 232007-06-27 Richard Stallman <rms@gnu.org>
diff --git a/lispref/control.texi b/lispref/control.texi
index 4c469a10368..e99a6329f3e 100644
--- a/lispref/control.texi
+++ b/lispref/control.texi
@@ -893,6 +893,12 @@ establishing an error handler, with the special form
893This deletes the file named @var{filename}, catching any error and 893This deletes the file named @var{filename}, catching any error and
894returning @code{nil} if an error occurs. 894returning @code{nil} if an error occurs.
895 895
896 The @code{condition-case} construct is often used to trap errors that
897are predictable, such as failure to open a file in a call to
898@code{insert-file-contents}. It is also used to trap errors that are
899totally unpredictable, such as when the program evaluates an expression
900read from the user.
901
896 The second argument of @code{condition-case} is called the 902 The second argument of @code{condition-case} is called the
897@dfn{protected form}. (In the example above, the protected form is a 903@dfn{protected form}. (In the example above, the protected form is a
898call to @code{delete-file}.) The error handlers go into effect when 904call to @code{delete-file}.) The error handlers go into effect when
@@ -920,15 +926,33 @@ the two gets to handle it.
920 If an error is handled by some @code{condition-case} form, this 926 If an error is handled by some @code{condition-case} form, this
921ordinarily prevents the debugger from being run, even if 927ordinarily prevents the debugger from being run, even if
922@code{debug-on-error} says this error should invoke the debugger. 928@code{debug-on-error} says this error should invoke the debugger.
923@xref{Error Debugging}. If you want to be able to debug errors that are
924caught by a @code{condition-case}, set the variable
925@code{debug-on-signal} to a non-@code{nil} value.
926 929
927 When an error is handled, control returns to the handler. Before this 930 If you want to be able to debug errors that are caught by a
928happens, Emacs unbinds all variable bindings made by binding constructs 931@code{condition-case}, set the variable @code{debug-on-signal} to a
929that are being exited and executes the cleanups of all 932non-@code{nil} value. You can also specify that a particular handler
930@code{unwind-protect} forms that are exited. Once control arrives at 933should let the debugger run first, by writing @code{debug} among the
931the handler, the body of the handler is executed. 934conditions, like this:
935
936@example
937@group
938(condition-case nil
939 (delete-file filename)
940 ((debug error) nil))
941@end group
942@end example
943
944@noindent
945The effect of @code{debug} here is only to prevent
946@code{condition-case} from suppressing the call to the debugger. Any
947given error will invoke the debugger only if @code{debug-on-error} and
948the other usual filtering mechanisms say it should. @xref{Error Debugging}.
949
950 Once Emacs decides that a certain handler handles the error, it
951returns control to that handler. To do so, Emacs unbinds all variable
952bindings made by binding constructs that are being exited, and
953executes the cleanups of all @code{unwind-protect} forms that are
954being exited. Once control arrives at the handler, the body of the
955handler executes normally.
932 956
933 After execution of the handler body, execution returns from the 957 After execution of the handler body, execution returns from the
934@code{condition-case} form. Because the protected form is exited 958@code{condition-case} form. Because the protected form is exited
@@ -937,12 +961,6 @@ execution at the point of the error, nor can it examine variable
937bindings that were made within the protected form. All it can do is 961bindings that were made within the protected form. All it can do is
938clean up and proceed. 962clean up and proceed.
939 963
940 The @code{condition-case} construct is often used to trap errors that
941are predictable, such as failure to open a file in a call to
942@code{insert-file-contents}. It is also used to trap errors that are
943totally unpredictable, such as when the program evaluates an expression
944read from the user.
945
946 Error signaling and handling have some resemblance to @code{throw} and 964 Error signaling and handling have some resemblance to @code{throw} and
947@code{catch} (@pxref{Catch and Throw}), but they are entirely separate 965@code{catch} (@pxref{Catch and Throw}), but they are entirely separate
948facilities. An error cannot be caught by a @code{catch}, and a 966facilities. An error cannot be caught by a @code{catch}, and a
@@ -960,7 +978,8 @@ error occurs during @var{protected-form}.
960 978
961Each of the @var{handlers} is a list of the form @code{(@var{conditions} 979Each of the @var{handlers} is a list of the form @code{(@var{conditions}
962@var{body}@dots{})}. Here @var{conditions} is an error condition name 980@var{body}@dots{})}. Here @var{conditions} is an error condition name
963to be handled, or a list of condition names; @var{body} is one or more 981to be handled, or a list of condition names (which can include @code{debug}
982to allow the debugger to run before the handler); @var{body} is one or more
964Lisp expressions to be executed when this handler handles an error. 983Lisp expressions to be executed when this handler handles an error.
965Here are examples of handlers: 984Here are examples of handlers:
966 985
diff --git a/lispref/display.texi b/lispref/display.texi
index 664ad1d2c15..f4d7a5dbcdb 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1760,6 +1760,11 @@ When @code{defface} executes, it defines the face according to
1760@var{spec}, then uses any customizations that were read from the 1760@var{spec}, then uses any customizations that were read from the
1761init file (@pxref{Init File}) to override that specification. 1761init file (@pxref{Init File}) to override that specification.
1762 1762
1763When you evaluate a @code{defcustom} form with @kbd{C-M-x} in Emacs
1764Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun}
1765overrides any customizations of the face. This way, the face reflects
1766exactly what the @code{defcustom} says.
1767
1763The purpose of @var{spec} is to specify how the face should appear on 1768The purpose of @var{spec} is to specify how the face should appear on
1764different kinds of terminals. It should be an alist whose elements 1769different kinds of terminals. It should be an alist whose elements
1765have the form @code{(@var{display} @var{atts})}. Each element's 1770have the form @code{(@var{display} @var{atts})}. Each element's
diff --git a/lispref/files.texi b/lispref/files.texi
index 5af77fafc31..343a6bc5e39 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -2768,7 +2768,7 @@ nothing and returns @code{nil}. Otherwise it returns the file name
2768of the local copy file. 2768of the local copy file.
2769@end defun 2769@end defun
2770 2770
2771@defun file-remote-p filename 2771@defun file-remote-p filename &optional connected
2772This function tests whether @var{filename} is a remote file. If 2772This function tests whether @var{filename} is a remote file. If
2773@var{filename} is local (not remote), the return value is @code{nil}. 2773@var{filename} is local (not remote), the return value is @code{nil}.
2774If @var{filename} is indeed remote, the return value is a string that 2774If @var{filename} is indeed remote, the return value is a string that
@@ -2777,7 +2777,7 @@ identifies the remote system.
2777This identifier string can include a host name and a user name, as 2777This identifier string can include a host name and a user name, as
2778well as characters designating the method used to access the remote 2778well as characters designating the method used to access the remote
2779system. For example, the remote identifier string for the filename 2779system. For example, the remote identifier string for the filename
2780@code{/ssh:user@@host:/some/file} is @code{/ssh:user@@host:}. 2780@code{/sudo::/some/file} is @code{/sudo:root@@localhost:}.
2781 2781
2782If @code{file-remote-p} returns the same identifier for two different 2782If @code{file-remote-p} returns the same identifier for two different
2783filenames, that means they are stored on the same file system and can 2783filenames, that means they are stored on the same file system and can
@@ -2785,6 +2785,11 @@ be accessed locally with respect to each other. This means, for
2785example, that it is possible to start a remote process accessing both 2785example, that it is possible to start a remote process accessing both
2786files at the same time. Implementors of file handlers need to ensure 2786files at the same time. Implementors of file handlers need to ensure
2787this principle is valid. 2787this principle is valid.
2788
2789If @var{connected} is non-@code{nil}, this function returns @code{nil}
2790even if @var{filename} is remote, if Emacs has no network connection
2791to its host. This is useful when you want to avoid the delay of
2792making connections when they don't exist.
2788@end defun 2793@end defun
2789 2794
2790@defun unhandled-file-name-directory filename 2795@defun unhandled-file-name-directory filename