Mercurial > emacs
changeset 101248:372dac1d4b95
(bibtex-format-entry): Simplify previous change.
author | Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
---|---|
date | Sat, 17 Jan 2009 14:58:53 +0000 |
parents | 4bb2f319641b |
children | 8889e525475d |
files | lisp/textmodes/bibtex.el |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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]*")