comparison lisp/international/quail.el @ 24238:20d23ea9713b

(quail-lookup-key): If cdr of MAP is a function, replace cdr of MAP by the return value of the function unconditionally.
author Kenichi Handa <handa@m17n.org>
date Mon, 01 Feb 1999 02:52:34 +0000
parents 3a4d3e2418dc
children cef9cf0a46b4
comparison
equal deleted inserted replaced
24237:16e5582ed876 24238:20d23ea9713b
854 (setcar map translation))) 854 (setcar map translation)))
855 (if (and (consp translation) (vectorp (cdr translation))) 855 (if (and (consp translation) (vectorp (cdr translation)))
856 (progn 856 (progn
857 (setq quail-current-translations translation) 857 (setq quail-current-translations translation)
858 (if (quail-forget-last-selection) 858 (if (quail-forget-last-selection)
859 (setcar (car quail-current-translations) 0)))) 859 (setcar (car quail-current-translations) 0))))))
860 ;; We may have to reform cdr part of MAP. 860 ;; We may have to reform cdr part of MAP.
861 (if (and (cdr map) (symbolp (cdr map))) 861 (if (and (cdr map) (functionp (cdr map)))
862 (progn 862 (setcdr map (funcall (cdr map) key len)))
863 (setcdr map (funcall (cdr map) key len))))
864 ))
865 map)) 863 map))
866 864
867 (put 'quail-error 'error-conditions '(quail-error error)) 865 (put 'quail-error 'error-conditions '(quail-error error))
868 (defun quail-error (&rest args) 866 (defun quail-error (&rest args)
869 (signal 'quail-error (apply 'format args))) 867 (signal 'quail-error (apply 'format args)))