# HG changeset patch # User Kenichi Handa # Date 873265614 0 # Node ID 3ada64a43911ac9cf14a5ecb2eee6a01622afd00 # Parent dd39cae4cf0fd930ac463002e6e820936c47e69f (quail-update-guidance): If PROMPTKEY is specified in the original CXTERM dictionary, show also candidates in Quail guidance buffer. (quail-show-translations): Likewise. diff -r dd39cae4cf0f -r 3ada64a43911 lisp/international/quail.el --- a/lisp/international/quail.el Wed Sep 03 05:46:07 1997 +0000 +++ b/lisp/international/quail.el Wed Sep 03 05:46:54 1997 +0000 @@ -1457,7 +1457,8 @@ (if (or input-method-verbose-flag (not (eq (selected-window) (minibuffer-window)))) (let ((guidance (quail-guidance))) - (cond ((eq guidance t) + (cond ((or (eq guidance t) + (listp guidance)) ;; Show the current possible translations. (quail-show-translations)) ((null guidance) @@ -1466,21 +1467,7 @@ (save-excursion (set-buffer quail-guidance-buf) (erase-buffer) - (insert key)))) - ((listp guidance) - ;; Show alternative characters specified in this alist. - (let* ((key quail-current-key) - (len (length key)) - (i 0) - ch alternative) - (save-excursion - (set-buffer quail-guidance-buf) - (erase-buffer) - (while (< i len) - (setq ch (aref key i)) - (setq alternative (cdr (assoc ch guidance))) - (insert (or alternative ch)) - (setq i (1+ i))))))))) + (insert key))))))) ;; Update completion buffer if displayed now. We highlight the ;; selected candidate string in *Completion* buffer if any. @@ -1525,7 +1512,18 @@ (erase-buffer) ;; Show the current key. - (insert key) + (let ((guidance (quail-guidance))) + (if (listp guidance) + ;; We must show the specified PROMPTKEY instead of the + ;; actual typed keys. + (let ((i 0) + (len (length key)) + prompt-key) + (while (< i len) + (setq prompt-key (cdr (assoc (aref key i) guidance))) + (insert (or prompt-key (aref key i))) + (setq i (1+ i)))) + (insert key))) ;; Show followable keys. (if (cdr map)