From: Roland Winkler Date: Sun, 23 Sep 2012 12:46:53 +0000 (-0500) Subject: lisp/textmodes/bibtex.el: minor bugfixes X-Git-Tag: emacs-24.2.90~244^2~120 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f438239765fd8583a3ed86007544221a2d6b5a2;p=emacs.git lisp/textmodes/bibtex.el: minor bugfixes --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 77c95a9d19e..39e0cba4e3e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-09-23 Roland Winkler + + * textmodes/bibtex.el (bibtex-autokey-transcriptions): Transcribe + also LaTeX hyphenation. + (bibtex-reformat): Bug fix. Do not quote twice the elements of + bibtex-reformat-previous-options. + 2012-09-23 Roland Winkler * proced.el (proced-renice-command): New variable. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 31656918fad..e0d93b68056 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1002,6 +1002,7 @@ See `bibtex-generate-autokey' for details." ("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" . "") ;; braces, quotes, concatenation. ("[`'\"{}#]" . "") + ("\\\\-" . "") ; \- -> ;; spaces ("\\\\?[ \t\n]+\\|~" . " ")) "Alist of (OLD-REGEXP . NEW-STRING) pairs. @@ -4893,21 +4894,22 @@ If mark is active reformat entries in region, if not in whole buffer." (if use-previous-options bibtex-reformat-previous-options (setq bibtex-reformat-previous-options - (mapcar (lambda (option) - (if (y-or-n-p (car option)) (cdr option))) - `(("Realign entries (recommended)? " . 'realign) - ("Remove empty optional and alternative fields? " . 'opts-or-alts) - ("Remove delimiters around pure numerical fields? " . 'numerical-fields) - (,(concat (if bibtex-comma-after-last-field "Insert" "Remove") - " comma at end of entry? ") . 'last-comma) - ("Replace double page dashes by single ones? " . 'page-dashes) - ("Delete whitespace at the beginning and end of fields? " . 'whitespace) - ("Inherit booktitle? " . 'inherit-booktitle) - ("Force delimiters? " . 'delimiters) - ("Unify case of entry types and field names? " . 'unify-case) - ("Enclose parts of field entries by braces? " . 'braces) - ("Replace parts of field entries by string constants? " . 'strings) - ("Sort fields? " . 'sort-fields)))))) + (delq nil + (mapcar (lambda (option) + (if (y-or-n-p (car option)) (cdr option))) + `(("Realign entries (recommended)? " . realign) + ("Remove empty optional and alternative fields? " . opts-or-alts) + ("Remove delimiters around pure numerical fields? " . numerical-fields) + (,(concat (if bibtex-comma-after-last-field "Insert" "Remove") + " comma at end of entry? ") . last-comma) + ("Replace double page dashes by single ones? " . page-dashes) + ("Delete whitespace at the beginning and end of fields? " . whitespace) + ("Inherit booktitle? " . inherit-booktitle) + ("Force delimiters? " . delimiters) + ("Unify case of entry types and field names? " . unify-case) + ("Enclose parts of field entries by braces? " . braces) + ("Replace parts of field entries by string constants? " . strings) + ("Sort fields? " . sort-fields))))))) ;; Do not include required-fields because `bibtex-reformat' ;; cannot handle the error messages of `bibtex-format-entry'. ;; Use `bibtex-validate' to check for required fields.