aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/international/mule.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 54d1cda86a5..4579399457f 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1181,13 +1181,20 @@ See also the variable `nonascii-translation-table'."
1181(defun define-translation-table (symbol &rest args) 1181(defun define-translation-table (symbol &rest args)
1182 "Define SYMBOL as a name of translation table made by ARGS. 1182 "Define SYMBOL as a name of translation table made by ARGS.
1183 1183
1184See the documentation of the function `make-translation-table' for the 1184If the first element of ARGS is a char-table of which purpose is
1185meaning of ARGS. 1185translation-table, just define SYMBOL as the name of it.
1186
1187In the other case, ARGS are the same as arguments to the function
1188`make-translation-table' (which see).
1186 1189
1187This function sets properties `translation-table' and 1190This function sets properties `translation-table' and
1188`translation-table-id' of SYMBOL to the created table itself and 1191`translation-table-id' of SYMBOL to the created table itself and
1189identification number of the table respectively." 1192identification number of the table respectively."
1190 (let ((table (apply 'make-translation-table args)) 1193 (let ((table (if (and (char-table-p (car args))
1194 (eq (char-table-subtype (car args))
1195 'translation-table))
1196 (car args)
1197 (apply 'make-translation-table args)))
1191 (len (length translation-table-vector)) 1198 (len (length translation-table-vector))
1192 (id 0) 1199 (id 0)
1193 (done nil)) 1200 (done nil))
@@ -1201,8 +1208,8 @@ identification number of the table respectively."
1201 (eq (car slot) symbol)) 1208 (eq (car slot) symbol))
1202 (progn 1209 (progn
1203 (aset translation-table-vector id (cons symbol table)) 1210 (aset translation-table-vector id (cons symbol table))
1204 (setq done t)))) 1211 (setq done t))
1205 (setq id (1+ id))) 1212 (setq id (1+ id)))))
1206 (put symbol 'translation-table-id id) 1213 (put symbol 'translation-table-id id)
1207 id)) 1214 id))
1208 1215