aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/robin.el
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2005-07-26 12:03:05 +0000
committerKenichi Handa <[email protected]>2005-07-26 12:03:05 +0000
commit3ffdf71e89e558bc94c43520a3b7c13f8811cc16 (patch)
tree0e4ab181b496cb43b2f1b706194badb8c83acdca /lisp/international/robin.el
parent4635e584dff211603c1a3cd40249ed9be0f28505 (diff)
(robin-define-package): Delete redundant
code. (robin-add-rule): Allow N-1 reverse conversion.
Diffstat (limited to 'lisp/international/robin.el')
-rw-r--r--lisp/international/robin.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/lisp/international/robin.el b/lisp/international/robin.el
index ff5ad4f6c5..7698eb4fa8 100644
--- a/lisp/international/robin.el
+++ b/lisp/international/robin.el
@@ -291,7 +291,7 @@ OUTPUT is either a character or a string. RULES are not evaluated.
If there already exists a robin package whose name is NAME, the new
one replaces the old one."
- (let ((old (assoc name robin-package-alist))
+ (let ((iname (intern name))
(new (list name "")) ; "" as a fake output
input output)
(dolist (r rules)
@@ -301,15 +301,11 @@ one replaces the old one."
(cond
((not (stringp input))
(error "Bad input sequence %S" r))
- ((characterp output)
- (put-char-code-property output (intern name) input))
+ ((char-valid-p output)
+ (put-char-code-property output iname input))
((not (stringp output))
(error "Bad output pattern %S" r))))
(setcar (cdr new) docstring) ; replace "" above with real docstring
- (if old
- (setcdr old (cdr new))
- (setq robin-package-alist
- (cons new robin-package-alist)))
`(let ((slot (assoc ,name robin-package-alist))
(newdef ',new))
(if slot
@@ -349,11 +345,9 @@ Internal use only."
(if branch
;; A definition already exists for this input.
- (progn
- (setcar (cdr branch) output)
- ;; Cancel char-code-property for old definition.
- (when (characterp output)
- (put-char-code-property output (intern name) nil)))
+ ;; We do not cancel old char-code-property of OUTPUT
+ ;; so that n-to-1 reverse conversion is possible.
+ (setcar (cdr branch) output)
;; New definition for this input.
(setcdr (last tree) (list (list head output))))