From 171666af2dcfc455cb1f69d0ad9ce85919e441cc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 6 Mar 1998 21:33:37 +0000 Subject: [PATCH] (quail-defrule-internal): New arg REPLACE. (quail-defrule): Call quail-defrule-internal with REPLACE t. --- lisp/international/quail.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 69b8982a7bd..ded94b76d02 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -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))) map))) @@ -841,7 +841,7 @@ current Quail package." (quail-defrule-internal key translation (quail-map))) ;;;###autoload -(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. -- 2.39.2