Commit 171666af authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(quail-defrule-internal): New arg REPLACE.

(quail-defrule): Call quail-defrule-internal with REPLACE t.
parent ecd57ad4
......@@ -798,7 +798,7 @@ If TRANSLATION is a Quail map or a function symbol which returns a Quail map,
',(let ((l rules)
(map (list nil)))
(while l
(quail-defrule-internal (car (car l)) (car (cdr (car l))) map)
(quail-defrule-internal (car (car l)) (car (cdr (car l))) map t)
(setq l (cdr l)))
......@@ -841,7 +841,7 @@ current Quail package."
(quail-defrule-internal key translation (quail-map)))
(defun quail-defrule-internal (key trans map)
(defun quail-defrule-internal (key trans map &optional append)
"Define KEY as TRANS in a Quail map MAP."
(if (null (stringp key))
"Invalid Quail key `%s'" key)
......@@ -891,7 +891,9 @@ current Quail package."
(error "Quail key %s is too short" key)
(setcdr entry trans))
(setcdr entry (append trans (cdr map)))))
(setcar map trans)))))
(if (and append (stringp (car map)) (stringp trans))
(setcar map (concat (car map) trans))
(setcar map trans))))))
(defun quail-get-translation (def key len)
"Return the translation specified as DEF for KEY of length LEN.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment