emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/bibtex.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/bibtex.el
Date: Mon, 22 May 2006 21:50:49 +0000

Index: emacs/lisp/textmodes/bibtex.el
diff -u emacs/lisp/textmodes/bibtex.el:1.118 
emacs/lisp/textmodes/bibtex.el:1.119
--- emacs/lisp/textmodes/bibtex.el:1.118        Mon May 22 13:19:01 2006
+++ emacs/lisp/textmodes/bibtex.el      Mon May 22 21:50:47 2006
@@ -1803,7 +1803,8 @@
 
         ;; 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 @@
   (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]