]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/bibtex.el
Un-revert changes mistakenly dropped by f9fabb2b
[gnu-emacs] / lisp / textmodes / bibtex.el
index abb98516441ea7b4700aa3ec8ca914d4ef7f552f..9d6d19e6e1e6a705dab620e633412fc23d151fbb 100644 (file)
@@ -2229,7 +2229,7 @@ Optional arg COMMA is as in `bibtex-enclosing-field'."
                        bibtex-entry-kill-ring))
       ;; If we copied an entry from a buffer containing only this one entry,
       ;; it can be missing the second "\n".
-      (unless (looking-back "\n\n") (insert "\n"))
+      (unless (looking-back "\n\n" (- (point) 2)) (insert "\n"))
       (unless (functionp bibtex-reference-keys)
         ;; update `bibtex-reference-keys'
         (save-excursion
@@ -4338,10 +4338,10 @@ Correct and validate again.\n"
             (goto-char (point-min))
             (forward-line 2)) ; first error message
           (display-buffer err-buf)
-          nil) ; return `nil' (i.e., buffer is invalid)
+          nil) ; return nil (i.e., buffer is invalid)
       (message "%s is syntactically correct"
                (if mark-active "Region" "Buffer"))
-      t))) ; return `t' (i.e., buffer is valid)
+      t))) ; return t (i.e., buffer is valid)
 
 (defun bibtex-validate-globally (&optional strings)
   "Check for duplicate keys in `bibtex-files'.
@@ -4395,9 +4395,9 @@ Return t if test was successful, nil otherwise."
             (goto-char (point-min))
             (forward-line 2)) ; first error message
           (display-buffer err-buf)
-          nil) ; return `nil' (i.e., buffer is invalid)
+          nil) ; return nil (i.e., buffer is invalid)
       (message "No duplicate keys.")
-      t))) ; return `t' (i.e., buffer is valid)
+      t))) ; return t (i.e., buffer is valid)
 
 (defun bibtex-next-field (begin &optional comma)
   "Move point to end of text of next BibTeX field or entry head.
@@ -4840,7 +4840,7 @@ If optional arg MOVE is non-nil move point to end of field."
 If optional prefix JUSTIFY is non-nil justify as well.
 In BibTeX mode this function is bound to `fill-paragraph-function'."
   (interactive "*P")
-  (let ((pnt (copy-marker (point)))
+  (let ((pnt (point-marker))
         (bounds (bibtex-enclosing-field t)))
     (bibtex-fill-field-bounds bounds justify)
     (goto-char pnt)))
@@ -4852,7 +4852,7 @@ names appear in column `bibtex-field-indentation', field text starts in
 column `bibtex-text-indentation' and continuation lines start here, too.
 If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too."
   (interactive "*")
-  (let ((pnt (copy-marker (point)))
+  (let ((pnt (point-marker))
         (beg (bibtex-beginning-of-entry)) ; move point
         bounds)
     (bibtex-delete-whitespace)