diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-05-22 21:50:47 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-05-22 21:50:47 +0000 |
commit | 8e6ea7a32117a8948dfd0f3acd0bd2beaa806728 (patch) | |
tree | 118af6d88d91c3a7e6ee1e3d9ae3399ea047a4c9 /lisp | |
parent | 35731e3bcd8268b6fa669aa35608a241dc19c26d (diff) | |
download | emacs-8e6ea7a32117a8948dfd0f3acd0bd2beaa806728.tar.gz |
(bibtex-format-entry, bibtex-clean-entry):
Signal more user-friendly error messages.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/textmodes/bibtex.el | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a763c61124a..8249b0d7773 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-22 Stefan Monnier <monnier@iro.umontreal.ca> + * textmodes/bibtex.el (bibtex-format-entry, bibtex-clean-entry): + Signal more user-friendly error messages. + * complete.el (PC-do-completion): Undo the addition of implicit wildcards if they did not lead to finding any match. (read-file-name-internal): Don't add the final > if the completion is diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 044c59d0cae..74ec8beffa2 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1803,7 +1803,8 @@ Formats current entry according to variable `bibtex-entry-format'." ;; identify entry type (goto-char (point-min)) - (re-search-forward bibtex-entry-type) + (or (re-search-forward bibtex-entry-type nil t) + (error "Not inside a BibTeX entry")) (let ((beg-type (1+ (match-beginning 0))) (end-type (match-end 0))) (setq entry-list (assoc-string (buffer-substring-no-properties @@ -3879,7 +3880,8 @@ At end of the cleaning process, the functions in (interactive "P") (let ((case-fold-search t) (start (bibtex-beginning-of-entry)) - (_ (looking-at bibtex-any-entry-maybe-empty-head)) + (_ (or (looking-at bibtex-any-entry-maybe-empty-head) + (error "Not inside a BibTeX entry"))) (entry-type (bibtex-type-in-head)) (key (bibtex-key-in-head))) ;; formatting |