changeset 22649:4934aaa2055c

(bibtex-hide-entry-bodies): When entry bodies are hidden, the last entry is no longer omitted.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Jun 1998 06:55:03 +0000
parents 3b7f1e026beb
children 2809ce5a1a0a
files lisp/textmodes/bibtex.el
diffstat 1 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/bibtex.el	Tue Jun 30 03:10:18 1998 +0000
+++ b/lisp/textmodes/bibtex.el	Tue Jun 30 06:55:03 1998 +0000
@@ -3005,19 +3005,15 @@
 With prefix argument ARG, show all text."
   (interactive "P")
   (save-excursion
-    (bibtex-beginning-of-first-entry)
     (let ((buffer-read-only nil))
       (if arg
-	  (subst-char-in-region (point) (point-max) ?\r ?\n t)
-        (while (not (eobp))
-          (subst-char-in-region
-           (point)
-           (progn
-             (re-search-forward "[\n\r]@" nil t)
-             (forward-line -1)
-             (point))
-           ?\n ?\r t)
-          (forward-line 1)))
+	  (subst-char-in-region (point-min) (point-max) ?\r ?\n t)
+	(let ((pos (point-max)))
+	  (goto-char (point-max))
+	  (while (re-search-backward "^@" nil t)
+	    (subst-char-in-region (point) pos ?\n ?\r t)
+	    (if (not (bobp)) (forward-char -1))
+	    (setq pos (point)))))
       (setq selective-display (not arg)))))
 
 (defun bibtex-sort-buffer ()