aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/sx.el b/sx.el
index 096e20b..c8d4e5b 100644
--- a/sx.el
+++ b/sx.el
@@ -104,6 +104,11 @@ is intentionally skipped."
(setq tail (cdr tail)))
(setcdr tail (cons x (cdr tail)))))
+(defun sx-user-error (format-string &rest args)
+ "Like `user-error', but prepend FORMAT-STRING with \"[sx]\".
+See `format'."
+ (signal 'user-error (list (apply #'format (concat "[sx] " format) args))))
+
(defun sx-message (format-string &rest args)
"Display FORMAT-STRING as a message with ARGS.
See `format'."