1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-08 15:35:02 +00:00

(bibtex-move-outside-of-entry):

Move backward only if point was not inside an entry.
This commit is contained in:
Richard M. Stallman 2003-10-20 23:31:01 +00:00
parent b6c846d341
commit 0640e91a85

View File

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