summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2003-10-20 23:31:01 +0000
committerRichard M. Stallman <rms@gnu.org>2003-10-20 23:31:01 +0000
commit0640e91a85ac4e43e3df76472c841540dc441b2e (patch)
tree357bea3143b504152824946a3392f4334e6fba96 /lisp
parentb6c846d34180f39824bbb116ed51929cb2f13511 (diff)
downloademacs-0640e91a85ac4e43e3df76472c841540dc441b2e.tar.gz
emacs-0640e91a85ac4e43e3df76472c841540dc441b2e.tar.bz2
emacs-0640e91a85ac4e43e3df76472c841540dc441b2e.zip
(bibtex-move-outside-of-entry):
Move backward only if point was not inside an entry.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/bibtex.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 480f304f175..82b15cf4eb5 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1656,16 +1656,15 @@ are defined, but only for the head part of the entry
"Make sure point is outside of a BibTeX entry."
(let ((orig-point (point)))
(bibtex-end-of-entry)
- (when (<= (point) orig-point)
+ (when (< (point) orig-point)
;; We moved backward, so we weren't inside an entry to begin with.
;; Leave point at the beginning of a line, and preferably
;; at the beginning of a paragraph.
(goto-char orig-point)
(beginning-of-line 1)
- (let ((cb (char-before (1- (point)))))
- (unless (and cb (= ?\n cb))
- (re-search-forward "^[ \t]*[@\n]" nil 'move)
- (backward-char 1))))
+ (unless (= ?\n (char-before (1- (point))))
+ (re-search-forward "^[ \t]*[@\n]" nil 'move)
+ (backward-char 1)))
(skip-chars-forward " \t\n")))
(defun bibtex-beginning-of-first-entry ()