aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorPaul Eggert2016-05-05 23:11:11 -0700
committerPaul Eggert2016-05-05 23:11:11 -0700
commit89ce83b20249dfb4e45f09dfdddf4c4b66d82968 (patch)
tree3d75245a5514df2ad7b17ae6d56727b9629846a9 /lisp/subr.el
parentd546ed13b04521308ef7ec8e7e5b68e03f1bbb38 (diff)
parent50650cb6887d99b01eeb1e686fc1f695c2a0c64a (diff)
downloademacs-89ce83b20249dfb4e45f09dfdddf4c4b66d82968.tar.gz
emacs-89ce83b20249dfb4e45f09dfdddf4c4b66d82968.zip
Merge from origin/emacs-25
50650cb Doc fixes for fclist and grep 5e814e0 Minor doc fixes for quoting 3347a73 `nreverse' the marker pairs list 1a4127d Use save-excursion in xref-location-marker more ab3ba91 shell-quote-argument DIR when appropriate 922c7a3 Rework xref-query-replace-in-results 3fe3510 * lisp/replace.el (query-replace-read-from): Use minibuffer-w... 0932b94 Fix todo-mode bug involving archived items (bug#23447) e68ad1f ; * etc/NEWS: Tiny edit. (Bug#23432) adc80b7 ; * test/automated/xref-tests.el: Add copyright and license. 4d8fd9c Handle "empty line" regexp in xref searches f559b37 Add tests for xref-collect-matches 6428aa0 Use grep-find-ignored-directories instead of vc-directory-exc... 6f82d8e Clear buffer-undo-list when showing xrefs c68a091 Note the quote translation in `message' in section "incompati... 52f86a7 * etc/NEWS: Mention (message "%s" (format ...)). 93703c5 (Common Keywords): Correct what missing :group means 79e5800 Improve documentation of Dired's 'A' and 'Q' commands 2ea2a2f Doc fixes for quoting 8544b98 posnp doc clarification 805204f Mention what a missing :group does ec554d7 Fix documentation of dired-aux search/replace commands
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index f67f70f85c9..094710b026c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -291,21 +291,27 @@ This function accepts any number of arguments, but ignores them."
291 291
292;; Signal a compile-error if the first arg is missing. 292;; Signal a compile-error if the first arg is missing.
293(defun error (&rest args) 293(defun error (&rest args)
294 "Signal an error, making error message by passing all args to `format'. 294 "Signal an error, making a message by passing args to `format-message'.
295In Emacs, the convention is that error messages start with a capital 295In Emacs, the convention is that error messages start with a capital
296letter but *do not* end with a period. Please follow this convention 296letter but *do not* end with a period. Please follow this convention
297for the sake of consistency." 297for the sake of consistency.
298
299Note: (error \"%s\" VALUE) makes the message VALUE without
300interpreting format characters like `%', `\\=`', and `\\=''."
298 (declare (advertised-calling-convention (string &rest args) "23.1")) 301 (declare (advertised-calling-convention (string &rest args) "23.1"))
299 (signal 'error (list (apply #'format-message args)))) 302 (signal 'error (list (apply #'format-message args))))
300 303
301(defun user-error (format &rest args) 304(defun user-error (format &rest args)
302 "Signal a pilot error, making error message by passing all args to `format'. 305 "Signal a pilot error, making a message by passing args to `format-message'.
303In Emacs, the convention is that error messages start with a capital 306In Emacs, the convention is that error messages start with a capital
304letter but *do not* end with a period. Please follow this convention 307letter but *do not* end with a period. Please follow this convention
305for the sake of consistency. 308for the sake of consistency.
306This is just like `error' except that `user-error's are expected to be the 309This is just like `error' except that `user-error's are expected to be the
307result of an incorrect manipulation on the part of the user, rather than the 310result of an incorrect manipulation on the part of the user, rather than the
308result of an actual problem." 311result of an actual problem.
312
313Note: (user-error \"%s\" VALUE) makes the message VALUE without
314interpreting format characters like `%', `\\=`', and `\\=''."
309 (signal 'user-error (list (apply #'format-message format args)))) 315 (signal 'user-error (list (apply #'format-message format args))))
310 316
311(defun define-error (name message &optional parent) 317(defun define-error (name message &optional parent)
@@ -1123,6 +1129,7 @@ The return value is a positive integer."
1123 1129
1124(defun posnp (obj) 1130(defun posnp (obj)
1125 "Return non-nil if OBJ appears to be a valid `posn' object specifying a window. 1131 "Return non-nil if OBJ appears to be a valid `posn' object specifying a window.
1132A `posn' object is returned from functions such as `event-start'.
1126If OBJ is a valid `posn' object, but specifies a frame rather 1133If OBJ is a valid `posn' object, but specifies a frame rather
1127than a window, return nil." 1134than a window, return nil."
1128 ;; FIXME: Correct the behavior of this function so that all valid 1135 ;; FIXME: Correct the behavior of this function so that all valid