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
(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'.
(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.