diff options
| author | Stefan Kangas | 2019-06-27 02:33:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-27 02:37:08 -0700 |
| commit | f90e0c5661b921528e41fe2404689a7e90c16895 (patch) | |
| tree | 156c184a3688967f465ae9159859807f9e2f675b | |
| parent | ee757886313eeec40936f3ad92a8adc628dcabdc (diff) | |
| download | emacs-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.el | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 15 |
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'. |
| 328 | In Emacs, the convention is that error messages start with a capital | 328 | In Emacs, the convention is that error messages start with a capital |
| 329 | letter but *do not* end with a period. Please follow this convention | 329 | letter but *do not* end with a period. Please follow this convention |
| 330 | for the sake of consistency. | 330 | for the sake of consistency. |
| 331 | Errors cause entry to the debugger when `debug-on-error' is | ||
| 332 | non-nil. This can be overridden by `debug-ignored-errors'. | ||
| 331 | 333 | ||
| 332 | Note: (error \"%s\" VALUE) makes the message VALUE without | 334 | Note: (error \"%s\" VALUE) makes the message VALUE without |
| 333 | interpreting format characters like `%', `\\=`', and `\\=''." | 335 | interpreting 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'. |
| 339 | In Emacs, the convention is that error messages start with a capital | ||
| 340 | letter but *do not* end with a period. Please follow this convention | ||
| 341 | for the sake of consistency. | ||
| 342 | This is just like `error' except that `user-error's are expected to be the | 341 | This is just like `error' except that `user-error's are expected to be the |
| 343 | result of an incorrect manipulation on the part of the user, rather than the | 342 | result of an incorrect manipulation on the part of the user, rather than the |
| 344 | result of an actual problem. | 343 | result of an actual problem. |
| 344 | In Emacs, the convention is that error messages start with a capital | ||
| 345 | letter but *do not* end with a period. Please follow this convention | ||
| 346 | for the sake of consistency. | ||
| 347 | In contrast with other errors, user errors normally do not cause | ||
| 348 | entry to the debugger, even when `debug-on-error' is non-nil. | ||
| 349 | This can be overridden by `debug-ignored-errors'. | ||
| 345 | 350 | ||
| 346 | Note: (user-error \"%s\" VALUE) makes the message VALUE without | 351 | Note: (user-error \"%s\" VALUE) makes the message VALUE without |
| 347 | interpreting format characters like `%', `\\=`', and `\\=''." | 352 | interpreting format characters like `%', `\\=`', and `\\=''." |