diff options
| author | Kenichi Handa | 1998-10-31 05:12:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-10-31 05:12:07 +0000 |
| commit | 61520ce75b63eae519495b76054dea1085f8f452 (patch) | |
| tree | 6fc2b2af531176446d779bf6da79f01e97f02828 | |
| parent | 33a2d2a074bbaf82e1883af3f79f4f3f3d170a55 (diff) | |
| download | emacs-61520ce75b63eae519495b76054dea1085f8f452.tar.gz emacs-61520ce75b63eae519495b76054dea1085f8f452.zip | |
(quail-start-translation): Handle
switching of the frame in read-key-sequence.
(quail-start-conversion): Likewise.
(quail-show-guidance-buf): Detach quail-guidance-buf from any
windows before setting an appropriate window for it.
(quail-hide-guidance-buf): Use window-minibuffer-p. Set
quail-guidance-win to nil.
(quail-update-guidance): If quail-guidance-buf is not in the
selected frame, call quail-show-guidance-buf again.
| -rw-r--r-- | lisp/international/quail.el | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 910afe0c720..6a6e9548508 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -941,7 +941,8 @@ The returned value is a Quail map specific to KEY." | |||
| 941 | (let* ((keyseq (read-key-sequence | 941 | (let* ((keyseq (read-key-sequence |
| 942 | (and input-method-use-echo-area | 942 | (and input-method-use-echo-area |
| 943 | (concat input-method-previous-message | 943 | (concat input-method-previous-message |
| 944 | quail-current-str)))) | 944 | quail-current-str)) |
| 945 | nil nil t)) | ||
| 945 | (cmd (lookup-key (quail-translation-keymap) keyseq))) | 946 | (cmd (lookup-key (quail-translation-keymap) keyseq))) |
| 946 | (if (if key | 947 | (if (if key |
| 947 | (and (commandp cmd) (not (eq cmd 'quail-other-command))) | 948 | (and (commandp cmd) (not (eq cmd 'quail-other-command))) |
| @@ -1007,7 +1008,8 @@ The returned value is a Quail map specific to KEY." | |||
| 1007 | (and input-method-use-echo-area | 1008 | (and input-method-use-echo-area |
| 1008 | (concat input-method-previous-message | 1009 | (concat input-method-previous-message |
| 1009 | quail-conversion-str | 1010 | quail-conversion-str |
| 1010 | quail-current-str)))) | 1011 | quail-current-str)) |
| 1012 | nil nil t)) | ||
| 1011 | (cmd (lookup-key (quail-conversion-keymap) keyseq))) | 1013 | (cmd (lookup-key (quail-conversion-keymap) keyseq))) |
| 1012 | (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) | 1014 | (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) |
| 1013 | (progn | 1015 | (progn |
| @@ -1478,6 +1480,14 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1478 | (set-buffer-modified-p nil))) | 1480 | (set-buffer-modified-p nil))) |
| 1479 | (bury-buffer quail-guidance-buf) | 1481 | (bury-buffer quail-guidance-buf) |
| 1480 | 1482 | ||
| 1483 | ;; Assign the buffer " *Minibuf-N*" to all windows which are now | ||
| 1484 | ;; displaying quail-guidance-buf. | ||
| 1485 | (let ((win-list (get-buffer-window-list quail-guidance-buf t t))) | ||
| 1486 | (while win-list | ||
| 1487 | (set-window-buffer (car win-list) | ||
| 1488 | (format " *Minibuf-%d*" (minibuffer-depth))) | ||
| 1489 | (setq win-list (cdr win-list)))) | ||
| 1490 | |||
| 1481 | ;; Then, display it in an appropriate window. | 1491 | ;; Then, display it in an appropriate window. |
| 1482 | (let ((win (minibuffer-window))) | 1492 | (let ((win (minibuffer-window))) |
| 1483 | (if (or (eq (selected-window) win) | 1493 | (if (or (eq (selected-window) win) |
| @@ -1515,7 +1525,7 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1515 | win) | 1525 | win) |
| 1516 | (while win-list | 1526 | (while win-list |
| 1517 | (setq win (car win-list) win-list (cdr win-list)) | 1527 | (setq win (car win-list) win-list (cdr win-list)) |
| 1518 | (if (eq win (minibuffer-window)) | 1528 | (if (window-minibuffer-p win) |
| 1519 | ;; We are using echo area for the guidance buffer. | 1529 | ;; We are using echo area for the guidance buffer. |
| 1520 | ;; Vacate it to the deepest minibuffer. | 1530 | ;; Vacate it to the deepest minibuffer. |
| 1521 | (set-window-buffer win | 1531 | (set-window-buffer win |
| @@ -1526,13 +1536,17 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1526 | ;;(set-window-dedicated-p win nil) | 1536 | ;;(set-window-dedicated-p win nil) |
| 1527 | (delete-frame (window-frame win))) | 1537 | (delete-frame (window-frame win))) |
| 1528 | ;;(set-window-dedicated-p win nil) | 1538 | ;;(set-window-dedicated-p win nil) |
| 1529 | (delete-window win))))))) | 1539 | (delete-window win)))) |
| 1540 | (setq quail-guidance-win nil)))) | ||
| 1530 | 1541 | ||
| 1531 | (defun quail-update-guidance () | 1542 | (defun quail-update-guidance () |
| 1532 | "Update the Quail guidance buffer and completion buffer (if displayed now)." | 1543 | "Update the Quail guidance buffer and completion buffer (if displayed now)." |
| 1533 | ;; Update guidance buffer. | 1544 | ;; Update guidance buffer. |
| 1534 | (if (quail-require-guidance-buf) | 1545 | (if (quail-require-guidance-buf) |
| 1535 | (let ((guidance (quail-guidance))) | 1546 | (let ((guidance (quail-guidance))) |
| 1547 | (or (and (eq (selected-frame) (window-frame (minibuffer-window))) | ||
| 1548 | (eq (selected-frame) (window-frame quail-guidance-win))) | ||
| 1549 | (quail-show-guidance-buf)) | ||
| 1536 | (cond ((or (eq guidance t) | 1550 | (cond ((or (eq guidance t) |
| 1537 | (consp guidance)) | 1551 | (consp guidance)) |
| 1538 | ;; Show the current possible translations. | 1552 | ;; Show the current possible translations. |