summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/bibtex.el50
-rw-r--r--lisp/textmodes/table.el21
2 files changed, 38 insertions, 33 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index a7be57e5a3f..670e763814c 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1006,32 +1006,36 @@ See `bibtex-generate-autokey' for details."
:type 'boolean)
(defvar bibtex-autokey-transcriptions
- '(;; 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
- ;; accents
- ("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" . "")
- ;; braces, quotes, concatenation.
- ("[`'\"{}#]" . "")
- ("\\\\-" . "") ; \- ->
- ;; spaces
- ("\\\\?[ \t\n]+\\|~" . " "))
+ (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
+Used as 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.")
+removing any accent characters.")
(defcustom bibtex-autokey-name-change-strings
bibtex-autokey-transcriptions
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 7f87ee3646d..33f181b80c3 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -2914,16 +2914,17 @@ WHERE is provided the cell and table at that location is reported."
(defun table-generate-source (language &optional dest-buffer caption)
"Generate source of the current table in the specified language.
LANGUAGE is a symbol that specifies the language to describe the
-structure of the table. It must be either `html', `latex' or `cals'.
-The resulted source text is inserted into DEST-BUFFER and the buffer
-object is returned. When DEST-BUFFER is omitted or nil the default
-buffer specified in `table-dest-buffer-name' is used. In this case
-the content of the default buffer is erased prior to the generation.
-When DEST-BUFFER is non-nil it is expected to be either a destination
-buffer or a name of the destination buffer. In this case the
-generated result is inserted at the current point in the destination
-buffer and the previously existing contents in the buffer are
-untouched.
+structure of the table. It must be either `html', `latex', `cals',
+`wiki', or `mediawiki'.
+The function inserts the resulting source text into DEST-BUFFER, and
+returns the buffer object. When DEST-BUFFER is omitted or nil, the
+function uses the default buffer specified in `table-dest-buffer-name'.
+In this case, the function erases the default buffer prior to the
+source generation.
+When DEST-BUFFER is non-nil, it should be either a destination
+buffer or a name of the destination buffer. In that case, the
+function inserts the generated result at point in the destination
+buffer, and leaves the previous contents of the buffer untouched.
References used for this implementation: