From 1acd4ec02d1b30c67471ebb719b23dcc00369543 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 15 Oct 2014 02:21:36 -0400 Subject: Replace some 'error' instances with 'user-error' --- bog.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bog.el') diff --git a/bog.el b/bog.el index df8fd7b..feadd3f 100644 --- a/bog.el +++ b/bog.el @@ -329,7 +329,7 @@ opened if locating a citekey from context fails." (num-choices (length citekey-file-names))) (cond ((= 0 num-choices) - (error "No file found for %s" citekey)) + (user-error "No file found for %s" citekey)) ((= 1 num-choices) (setq citekey-file (car citekey-files))) (t @@ -447,7 +447,7 @@ opened if locating a citekey from context fails." "Open BibTeX file of CITEKEY contained in `bog-bib-directory'." (let ((bib-file (bog-citekey-as-bib citekey))) (unless (file-exists-p bib-file) - (error "%s does not exist" bib-file)) + (user-error "%s does not exist" bib-file)) (find-file-other-window bib-file))) (defun bog-find-citekey-entry (citekey) @@ -484,7 +484,7 @@ one entry per BibTeX file." (bib-file (expand-file-name (concat citekey ".bib") new-directory))) (when (get-buffer bib-file) - (error "Buffer for %s already exists" bib-file)) + (user-error "Buffer for %s already exists" bib-file)) (rename-file file bib-file) (rename-buffer bib-file) (set-visited-file-name bib-file) @@ -498,7 +498,7 @@ one entry per BibTeX file." (interactive) (let ((bib-buffer (get-buffer-create "*Bib*")) (refs (-map 'bog-citekey-as-bib (bog-collect-references)))) - (--each refs (unless (file-exists-p it) (error "%s does not exist" it))) + (--each refs (unless (file-exists-p it) (user-error "%s does not exist" it))) (switch-to-buffer-other-window bib-buffer) (--each refs (insert "\n") -- cgit v1.2.3