From: Roland Winkler Date: Sat, 17 Jan 2009 14:59:47 +0000 (+0000) Subject: (bibtex-format-entry): Simplify previous change. X-Git-Tag: emacs-pretest-23.0.90~404 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=635618a409f363ccec6b42a3ad59fcb46154863f;p=emacs.git (bibtex-format-entry): Simplify previous change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87f89797f85..e28ac1d0a8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-01-17 Roland Winkler + + * textmodes/bibtex.el (bibtex-format-entry): Simplify previous + change. + 2009-01-17 Eli Zaretskii * dos-w32.el (find-buffer-file-type-coding-system): If `(car diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 0114f234dd6..139f9f02d04 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1893,7 +1893,6 @@ Formats current entry according to variable `bibtex-entry-format'." strings) bibtex-entry-format)) (left-delim-re (regexp-quote (bibtex-field-left-delimiter))) - (right-delim-re (regexp-quote (bibtex-field-right-delimiter))) bounds crossref-key req-field-list default-field-list field-list alt-fields error-field-name) (unwind-protect @@ -2006,12 +2005,11 @@ Formats current entry according to variable `bibtex-entry-format'." (if (looking-at bibtex-field-const) (goto-char (match-end 0)) (let ((boundaries (bibtex-parse-field-string))) - (unless (looking-at left-delim-re) + (if (looking-at left-delim-re) + (goto-char (cdr boundaries)) (delete-char 1) - (insert (bibtex-field-left-delimiter))) - (goto-char (1- (cdr boundaries))) - (if (looking-at right-delim-re) - (forward-char) + (insert (bibtex-field-left-delimiter)) + (goto-char (1- (cdr boundaries))) (delete-char 1) (insert (bibtex-field-right-delimiter))))) (if (looking-at "[ \t\n]*#[ \t\n]*")