From 9d950e96c48b8e1a0dad779cdf34a4f8a76621db Mon Sep 17 00:00:00 2001 From: Chunyang Xu Date: Sun, 1 May 2016 12:47:14 +0800 Subject: [PATCH] org-capture: Adapt user-error for aborting by user When `org-capture` is aborted by user with 'q' or 'C-g', `user-error' is better than `error' to use to exit. --- lisp/org-capture.el | 4 ++-- 1 file 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)) -- 2.8.0