aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2019-06-27 02:33:10 -0700
committerPaul Eggert2019-06-27 02:37:08 -0700
commitf90e0c5661b921528e41fe2404689a7e90c16895 (patch)
tree156c184a3688967f465ae9159859807f9e2f675b
parentee757886313eeec40936f3ad92a8adc628dcabdc (diff)
downloademacs-f90e0c5661b921528e41fe2404689a7e90c16895.tar.gz
emacs-f90e0c5661b921528e41fe2404689a7e90c16895.zip
Clarify error and user-error docstrings
* lisp/subr.el (error, user-error) * lisp/net/tramp.el (tramp-user-error): Change "pilot error" to "user error" and improve documentation.
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/subr.el15
2 files changed, 11 insertions, 6 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 4c9b67b13b4..1abed4e717a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1860,7 +1860,7 @@ an input event arrives. The other arguments are passed to `tramp-error'."
1860 1860
1861;; We must make it a defun, because it is used earlier already. 1861;; We must make it a defun, because it is used earlier already.
1862(defun tramp-user-error (vec-or-proc fmt-string &rest arguments) 1862(defun tramp-user-error (vec-or-proc fmt-string &rest arguments)
1863 "Signal a pilot error." 1863 "Signal a user error."
1864 (unwind-protect 1864 (unwind-protect
1865 (apply 1865 (apply
1866 #'tramp-error vec-or-proc 1866 #'tramp-error vec-or-proc
diff --git a/lisp/subr.el b/lisp/subr.el
index b981af6afe6..fcad2ccf0a2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -324,10 +324,12 @@ This function accepts any number of arguments, but ignores them."
324 324
325;; Signal a compile-error if the first arg is missing. 325;; Signal a compile-error if the first arg is missing.
326(defun error (&rest args) 326(defun error (&rest args)
327 "Signal an error, making a message by passing args to `format-message'. 327 "Signal an error, making a message by passing ARGS to `format-message'.
328In Emacs, the convention is that error messages start with a capital 328In Emacs, the convention is that error messages start with a capital
329letter but *do not* end with a period. Please follow this convention 329letter but *do not* end with a period. Please follow this convention
330for the sake of consistency. 330for the sake of consistency.
331Errors cause entry to the debugger when `debug-on-error' is
332non-nil. This can be overridden by `debug-ignored-errors'.
331 333
332Note: (error \"%s\" VALUE) makes the message VALUE without 334Note: (error \"%s\" VALUE) makes the message VALUE without
333interpreting format characters like `%', `\\=`', and `\\=''." 335interpreting format characters like `%', `\\=`', and `\\=''."
@@ -335,13 +337,16 @@ interpreting format characters like `%', `\\=`', and `\\=''."
335 (signal 'error (list (apply #'format-message args)))) 337 (signal 'error (list (apply #'format-message args))))
336 338
337(defun user-error (format &rest args) 339(defun user-error (format &rest args)
338 "Signal a pilot error, making a message by passing args to `format-message'. 340 "Signal a user error, making a message by passing ARGS to `format-message'.
339In Emacs, the convention is that error messages start with a capital
340letter but *do not* end with a period. Please follow this convention
341for the sake of consistency.
342This is just like `error' except that `user-error's are expected to be the 341This is just like `error' except that `user-error's are expected to be the
343result of an incorrect manipulation on the part of the user, rather than the 342result of an incorrect manipulation on the part of the user, rather than the
344result of an actual problem. 343result of an actual problem.
344In Emacs, the convention is that error messages start with a capital
345letter but *do not* end with a period. Please follow this convention
346for the sake of consistency.
347In contrast with other errors, user errors normally do not cause
348entry to the debugger, even when `debug-on-error' is non-nil.
349This can be overridden by `debug-ignored-errors'.
345 350
346Note: (user-error \"%s\" VALUE) makes the message VALUE without 351Note: (user-error \"%s\" VALUE) makes the message VALUE without
347interpreting format characters like `%', `\\=`', and `\\=''." 352interpreting format characters like `%', `\\=`', and `\\=''."