diff options
| author | Stefan Monnier | 2006-05-22 21:50:47 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-05-22 21:50:47 +0000 |
| commit | 8e6ea7a32117a8948dfd0f3acd0bd2beaa806728 (patch) | |
| tree | 118af6d88d91c3a7e6ee1e3d9ae3399ea047a4c9 /lisp/textmodes/bibtex.el | |
| parent | 35731e3bcd8268b6fa669aa35608a241dc19c26d (diff) | |
| download | emacs-8e6ea7a32117a8948dfd0f3acd0bd2beaa806728.tar.gz emacs-8e6ea7a32117a8948dfd0f3acd0bd2beaa806728.zip | |
(bibtex-format-entry, bibtex-clean-entry):
Signal more user-friendly error messages.
Diffstat (limited to 'lisp/textmodes/bibtex.el')
| -rw-r--r-- | lisp/textmodes/bibtex.el | 6 |
1 files changed, 4 insertions, 2 deletions
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'." | |||
| 1803 | 1803 | ||
| 1804 | ;; identify entry type | 1804 | ;; identify entry type |
| 1805 | (goto-char (point-min)) | 1805 | (goto-char (point-min)) |
| 1806 | (re-search-forward bibtex-entry-type) | 1806 | (or (re-search-forward bibtex-entry-type nil t) |
| 1807 | (error "Not inside a BibTeX entry")) | ||
| 1807 | (let ((beg-type (1+ (match-beginning 0))) | 1808 | (let ((beg-type (1+ (match-beginning 0))) |
| 1808 | (end-type (match-end 0))) | 1809 | (end-type (match-end 0))) |
| 1809 | (setq entry-list (assoc-string (buffer-substring-no-properties | 1810 | (setq entry-list (assoc-string (buffer-substring-no-properties |
| @@ -3879,7 +3880,8 @@ At end of the cleaning process, the functions in | |||
| 3879 | (interactive "P") | 3880 | (interactive "P") |
| 3880 | (let ((case-fold-search t) | 3881 | (let ((case-fold-search t) |
| 3881 | (start (bibtex-beginning-of-entry)) | 3882 | (start (bibtex-beginning-of-entry)) |
| 3882 | (_ (looking-at bibtex-any-entry-maybe-empty-head)) | 3883 | (_ (or (looking-at bibtex-any-entry-maybe-empty-head) |
| 3884 | (error "Not inside a BibTeX entry"))) | ||
| 3883 | (entry-type (bibtex-type-in-head)) | 3885 | (entry-type (bibtex-type-in-head)) |
| 3884 | (key (bibtex-key-in-head))) | 3886 | (key (bibtex-key-in-head))) |
| 3885 | ;; formatting | 3887 | ;; formatting |