diff options
author | Kenichi Handa <handa@m17n.org> | 1997-09-03 05:46:54 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-09-03 05:46:54 +0000 |
commit | b8cd1360b12951a47ff37eefb68d9e59c2c83309 (patch) | |
tree | 45080b3ae194943f9081fe90ceda479c1906db41 | |
parent | f10f03e8ee7efceea04d86ff406814b4f3e576a4 (diff) | |
download | emacs-b8cd1360b12951a47ff37eefb68d9e59c2c83309.tar.gz emacs-b8cd1360b12951a47ff37eefb68d9e59c2c83309.tar.bz2 emacs-b8cd1360b12951a47ff37eefb68d9e59c2c83309.zip |
(quail-update-guidance): If PROMPTKEY is
specified in the original CXTERM dictionary, show also candidates
in Quail guidance buffer.
(quail-show-translations): Likewise.
-rw-r--r-- | lisp/international/quail.el | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 87931cd5666..df5f009988d 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1457,7 +1457,8 @@ or in a newly created frame (if the selected frame has no other windows)." (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 @@ or in a newly created frame (if the selected frame has no other windows)." (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 @@ or in a newly created frame (if the selected frame has no other windows)." (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) |