# HG changeset patch # User Roland Winkler # Date 1232204333 0 # Node ID 372dac1d4b9596f3d0e21fb48cd5e46701937e64 # Parent 4bb2f319641b517f08936d3ca2597a4bcfe2bbd7 (bibtex-format-entry): Simplify previous change. diff -r 4bb2f319641b -r 372dac1d4b95 lisp/textmodes/bibtex.el --- a/lisp/textmodes/bibtex.el Sat Jan 17 14:24:34 2009 +0000 +++ b/lisp/textmodes/bibtex.el Sat Jan 17 14:58:53 2009 +0000 @@ -1893,7 +1893,6 @@ 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 @@ (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]*")