* mu4e: only use user-error if it exists (i.e.., emacs trunk); otherwise

user (error..)

  it'd be nice to have something like user-error in emacs 24, 23, i.e., like
  error but without triggering the debugger
This commit is contained in:
djcb 2012-09-11 22:47:58 +03:00
parent 07eb3a7515
commit f9e14d72b4
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ a local-exit and does not return."
"Create [mu4e]-prefixed warning based on format FRM and
ARGS. Does a local-exit and does not return."
(mu4e-log 'error (apply 'mu4e-format frm args))
(user-error "%s" (apply 'mu4e-format frm args)))
(if (fboundp 'user-error)
(user-error "%s" (apply 'mu4e-format frm args)) ;; only in emacs-trunk
(error "%s" (apply 'mu4e-format frm args))))
(defun mu4e~read-char-choice (prompt choices)
"Compatiblity wrapper for `read-char-choice', which is emacs-24