1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 22:20:52 -08:00

(bibtex-format-entry, bibtex-clean-entry):

Signal more user-friendly error messages.
This commit is contained in:
Stefan Monnier 2006-05-22 21:50:47 +00:00
parent 35731e3bcd
commit 8e6ea7a321
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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