diff options
| author | Kenichi Handa | 1997-09-03 05:46:54 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-09-03 05:46:54 +0000 |
| commit | b8cd1360b12951a47ff37eefb68d9e59c2c83309 (patch) | |
| tree | 45080b3ae194943f9081fe90ceda479c1906db41 | |
| parent | f10f03e8ee7efceea04d86ff406814b4f3e576a4 (diff) | |
| download | emacs-b8cd1360b12951a47ff37eefb68d9e59c2c83309.tar.gz 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)." | |||
| 1457 | (if (or input-method-verbose-flag | 1457 | (if (or input-method-verbose-flag |
| 1458 | (not (eq (selected-window) (minibuffer-window)))) | 1458 | (not (eq (selected-window) (minibuffer-window)))) |
| 1459 | (let ((guidance (quail-guidance))) | 1459 | (let ((guidance (quail-guidance))) |
| 1460 | (cond ((eq guidance t) | 1460 | (cond ((or (eq guidance t) |
| 1461 | (listp guidance)) | ||
| 1461 | ;; Show the current possible translations. | 1462 | ;; Show the current possible translations. |
| 1462 | (quail-show-translations)) | 1463 | (quail-show-translations)) |
| 1463 | ((null guidance) | 1464 | ((null guidance) |
| @@ -1466,21 +1467,7 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1466 | (save-excursion | 1467 | (save-excursion |
| 1467 | (set-buffer quail-guidance-buf) | 1468 | (set-buffer quail-guidance-buf) |
| 1468 | (erase-buffer) | 1469 | (erase-buffer) |
| 1469 | (insert key)))) | 1470 | (insert key))))))) |
| 1470 | ((listp guidance) | ||
| 1471 | ;; Show alternative characters specified in this alist. | ||
| 1472 | (let* ((key quail-current-key) | ||
| 1473 | (len (length key)) | ||
| 1474 | (i 0) | ||
| 1475 | ch alternative) | ||
| 1476 | (save-excursion | ||
| 1477 | (set-buffer quail-guidance-buf) | ||
| 1478 | (erase-buffer) | ||
| 1479 | (while (< i len) | ||
| 1480 | (setq ch (aref key i)) | ||
| 1481 | (setq alternative (cdr (assoc ch guidance))) | ||
| 1482 | (insert (or alternative ch)) | ||
| 1483 | (setq i (1+ i))))))))) | ||
| 1484 | 1471 | ||
| 1485 | ;; Update completion buffer if displayed now. We highlight the | 1472 | ;; Update completion buffer if displayed now. We highlight the |
| 1486 | ;; selected candidate string in *Completion* buffer if any. | 1473 | ;; 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)." | |||
| 1525 | (erase-buffer) | 1512 | (erase-buffer) |
| 1526 | 1513 | ||
| 1527 | ;; Show the current key. | 1514 | ;; Show the current key. |
| 1528 | (insert key) | 1515 | (let ((guidance (quail-guidance))) |
| 1516 | (if (listp guidance) | ||
| 1517 | ;; We must show the specified PROMPTKEY instead of the | ||
| 1518 | ;; actual typed keys. | ||
| 1519 | (let ((i 0) | ||
| 1520 | (len (length key)) | ||
| 1521 | prompt-key) | ||
| 1522 | (while (< i len) | ||
| 1523 | (setq prompt-key (cdr (assoc (aref key i) guidance))) | ||
| 1524 | (insert (or prompt-key (aref key i))) | ||
| 1525 | (setq i (1+ i)))) | ||
| 1526 | (insert key))) | ||
| 1529 | 1527 | ||
| 1530 | ;; Show followable keys. | 1528 | ;; Show followable keys. |
| 1531 | (if (cdr map) | 1529 | (if (cdr map) |