Mercurial > emacs
changeset 21082:ca3bd6ec875d
(quail-defrule-internal): New arg REPLACE.
(quail-defrule): Call quail-defrule-internal with REPLACE t.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 06 Mar 1998 21:33:37 +0000 |
parents | f7d33c30712e |
children | a5a15ce66e98 |
files | lisp/international/quail.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/quail.el Fri Mar 06 21:32:55 1998 +0000 +++ b/lisp/international/quail.el Fri Mar 06 21:33:37 1998 +0000 @@ -798,7 +798,7 @@ ',(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 @@ (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 @@ (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.