summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunyang Xu <xuchunyang.me@gmail.com>2016-05-01 14:11:43 +0800
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-05-03 19:17:34 +0200
commitb46527a8ba90c9f8c3b2425d934fa69fea8bb7fe (patch)
tree0ba7e9bef76277560257148777f8571b60ebd6e0
parentd87bf07ea6ea1ed3a5693b53881a012427ee4edf (diff)
downloadorg-mode-b46527a8ba90c9f8c3b2425d934fa69fea8bb7fe.tar.gz
org-capture: Adapt user-error for aborting by user
* lisp/org-capture.el (org-capture): (org-mks): Replace `error' with `user-error'. When `org-capture` is aborted by user with 'q' or 'C-g', `user-error' is better than `error' when exiting. TINYCHANGE
-rw-r--r--lisp/org-capture.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 008f0a6..34a6817 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -590,7 +590,7 @@ of the day at point (if any) or the current HH:MM time."
((equal entry "C")
(customize-variable 'org-capture-templates))
((equal entry "q")
- (error "Abort"))
+ (user-error "Abort"))
(t
(org-capture-set-plist entry)
(org-capture-get-template)
@@ -1504,7 +1504,7 @@ only the bare key is returned."
(setq pressed (char-to-string (read-char-exclusive))))
(when (equal pressed "\C-g")
(kill-buffer buffer)
- (error "Abort"))
+ (user-error "Abort"))
(when (and (not (assoc pressed table))
(not (member pressed des-keys))
(assoc pressed specials))