[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39686: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings
From: |
Roland Winkler |
Subject: |
bug#39686: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings |
Date: |
Fri, 21 Feb 2020 08:13:51 -0600 |
Hi Eli
I do not know the exact status of Emacs 27. Is it OK to install the
patch below into the Emacs 27 branch? The patch fixes a bug that
must have existed for at least about 20 years. So likely it will
not affect many users. But even if the patch has a hidden new bug,
it should not break anything crucial for users either.
Roland
(defvar bibtex-autokey-transcriptions
(nconc
(mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a)))
'(;; language specific characters
(("\\aa") . "a") ; \aa -> a
(("\\AA") . "A") ; \AA -> A
(("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae
(("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae
(("\\i") . "i") ; \i -> i
(("\\j") . "j") ; \j -> j
(("\\l") . "l") ; \l -> l
(("\\L") . "L") ; \L -> L
(("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe
(("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe
(("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss
(("\"u" "\\\"u") . "ue") ; "u,\"u -> ue
(("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue
;; hyphen, accents
(("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v"
"\\H" "\\t" "\\c" "\\d" "\\b") . "")
;; space
(("~") . " ")))
;; more spaces
'(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ")
;; braces, quotes, concatenation.
("[`'\"{}#]" . "")))
"Alist of (OLD-REGEXP . NEW-STRING) pairs.
Used by the default values of `bibtex-autokey-name-change-strings' and
`bibtex-autokey-titleword-change-strings'. Defaults to translating some
language specific characters to their ASCII transcriptions, and
removing any character accents.")
bug#39686: 25.2; Wrong behaviour of bibtex-autokey-name-change-strings, Mattias EngdegÄrd, 2020/02/21