diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-09-11 00:27:47 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-09-11 00:27:47 -0400 |
commit | d99fbff01ed7bc92e92f23f224885bb9ce7ea7f6 (patch) | |
tree | 45999e0687c7a460222349d19820249d9093bc7e /lisp | |
parent | f3486c1a6948060b0b9a32c64739d7f49a88405c (diff) | |
download | emacs.d-d99fbff01ed7bc92e92f23f224885bb9ce7ea7f6.tar.gz |
Replace some error calls with user-error calls
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-buffile.el | 6 | ||||
-rw-r--r-- | lisp/init-external.el | 2 | ||||
-rw-r--r-- | lisp/init-framewin.el | 2 | ||||
-rw-r--r-- | lisp/init-tex.el | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lisp/init-buffile.el b/lisp/init-buffile.el index 31695fd..82e295d 100644 --- a/lisp/init-buffile.el +++ b/lisp/init-buffile.el @@ -11,10 +11,10 @@ (let ((name (buffer-name)) (filename (buffer-file-name))) (if (not (and filename (file-exists-p filename))) - (error "Buffer '%s' is not visiting a file!" name) + (user-error "Buffer '%s' is not visiting a file!" name) (let ((new-name (read-file-name "New name: " filename))) (if (get-buffer new-name) - (error "A buffer named '%s' already exists!" new-name) + (user-error "A buffer named '%s' already exists!" new-name) (rename-file filename new-name 1) (rename-buffer new-name) (set-visited-file-name new-name) @@ -28,7 +28,7 @@ (defun km/delete-this-file () "Delete the current file, and kill the buffer." (interactive) - (or (buffer-file-name) (error "No file is currently being edited")) + (or (buffer-file-name) (user-error "No file is currently being edited")) (when (yes-or-no-p (format "Really delete '%s'?" (file-name-nondirectory buffer-file-name))) (delete-file (buffer-file-name)) diff --git a/lisp/init-external.el b/lisp/init-external.el index 7c3befd..ea33efd 100644 --- a/lisp/init-external.el +++ b/lisp/init-external.el @@ -66,7 +66,7 @@ monitor setup)." (interactive) (-if-let (comp-buffer (get-buffer "*compilation*")) (display-buffer comp-buffer) - (error "No compilation buffer"))) + (user-error "No compilation buffer"))) (define-key km/external-map "c" 'compile) (define-key km/external-map "g" 'recompile) diff --git a/lisp/init-framewin.el b/lisp/init-framewin.el index b954c4a..238a56f 100644 --- a/lisp/init-framewin.el +++ b/lisp/init-framewin.el @@ -24,7 +24,7 @@ Assumes that the window is only split into two." (interactive) (unless (= (length (window-list)) 2) - (error "Can only toggle a window split in two")) + (user-error "Can only toggle a window split in two")) (let ((split-vertically-p (window-combined-p))) (delete-window) (if split-vertically-p diff --git a/lisp/init-tex.el b/lisp/init-tex.el index 2929606..44da5ac 100644 --- a/lisp/init-tex.el +++ b/lisp/init-tex.el @@ -69,7 +69,7 @@ The point should be beyond \"\\section\"." (let ((pdf-file (concat (file-name-base (buffer-file-name)) ".pdf"))) (unless (file-exists-p pdf-file) - (error "%s does not exist" pdf-file)) + (user-error "%s does not exist" pdf-file)) (start-process "tex-pdf" nil "xdg-open" pdf-file))) (after 'latex |