Mercurial > emacs
comparison lisp/international/quail.el @ 59066:c979627ce50b
(quail-start-translation): Fix prompt
string for the case if input-method-use-echo-area being non-nil.
(quail-start-conversion): Likewise.
(quail-show-guidance): Don't show guidance if
input-method-use-echo-area is non-nil.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 22 Dec 2004 05:44:13 +0000 |
parents | 0a72a48de076 |
children | cd94feb048c7 eac554634bfa |
comparison
equal
deleted
inserted
replaced
59065:64d9c1721a28 | 59066:c979627ce50b |
---|---|
1369 (if key | 1369 (if key |
1370 (setq unread-command-events (cons key unread-command-events))) | 1370 (setq unread-command-events (cons key unread-command-events))) |
1371 (while quail-translating | 1371 (while quail-translating |
1372 (set-buffer-modified-p modified-p) | 1372 (set-buffer-modified-p modified-p) |
1373 (quail-show-guidance) | 1373 (quail-show-guidance) |
1374 (let* ((keyseq (read-key-sequence | 1374 (let* ((prompt (if input-method-use-echo-area |
1375 (and input-method-use-echo-area | 1375 (format "%s%s %s" |
1376 (concat input-method-previous-message | 1376 (or input-method-previous-message "") |
1377 quail-current-str)) | 1377 quail-current-str |
1378 nil nil t)) | 1378 quail-guidance-str))) |
1379 (keyseq (read-key-sequence prompt nil nil t)) | |
1379 (cmd (lookup-key (quail-translation-keymap) keyseq))) | 1380 (cmd (lookup-key (quail-translation-keymap) keyseq))) |
1380 (if (if key | 1381 (if (if key |
1381 (and (commandp cmd) (not (eq cmd 'quail-other-command))) | 1382 (and (commandp cmd) (not (eq cmd 'quail-other-command))) |
1382 (eq cmd 'quail-self-insert-command)) | 1383 (eq cmd 'quail-self-insert-command)) |
1383 (progn | 1384 (progn |
1434 (setq quail-current-key "" | 1435 (setq quail-current-key "" |
1435 quail-current-str "" | 1436 quail-current-str "" |
1436 quail-translating t) | 1437 quail-translating t) |
1437 (quail-setup-overlays nil))) | 1438 (quail-setup-overlays nil))) |
1438 (quail-show-guidance) | 1439 (quail-show-guidance) |
1439 (let* ((keyseq (read-key-sequence | 1440 (let* ((prompt (if input-method-use-echo-area |
1440 (and input-method-use-echo-area | 1441 (format "%s%s%s %s" |
1441 (concat input-method-previous-message | 1442 (or input-method-previous-message "") |
1442 quail-conversion-str | 1443 quail-conversion-str |
1443 quail-current-str)) | 1444 quail-current-str |
1444 nil nil t)) | 1445 quail-guidance-str))) |
1446 (keyseq (read-key-sequence prompt nil nil t)) | |
1445 (cmd (lookup-key (quail-conversion-keymap) keyseq))) | 1447 (cmd (lookup-key (quail-conversion-keymap) keyseq))) |
1446 (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) | 1448 (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) |
1447 (progn | 1449 (progn |
1448 (setq last-command-event (aref keyseq (1- (length keyseq))) | 1450 (setq last-command-event (aref keyseq (1- (length keyseq))) |
1449 last-command this-command | 1451 last-command this-command |
1948 (quail-setup-completion-buf) | 1950 (quail-setup-completion-buf) |
1949 (bury-buffer quail-completion-buf) | 1951 (bury-buffer quail-completion-buf) |
1950 | 1952 |
1951 ;; Then, show the guidance. | 1953 ;; Then, show the guidance. |
1952 (when (and (quail-require-guidance-buf) | 1954 (when (and (quail-require-guidance-buf) |
1955 (not input-method-use-echo-area) | |
1953 (null unread-command-events) | 1956 (null unread-command-events) |
1954 (null unread-post-input-method-events)) | 1957 (null unread-post-input-method-events)) |
1955 (if (or (eq (selected-window) (minibuffer-window)) | 1958 (if (eq (selected-window) (minibuffer-window)) |
1956 input-method-use-echo-area) | |
1957 (if (eq (minibuffer-window) (frame-root-window)) | 1959 (if (eq (minibuffer-window) (frame-root-window)) |
1958 ;; Use another frame. It is sure that we are using some | 1960 ;; Use another frame. It is sure that we are using some |
1959 ;; window system. | 1961 ;; window system. |
1960 (let ((guidance quail-guidance-str)) | 1962 (let ((guidance quail-guidance-str)) |
1961 (or (frame-live-p quail-guidance-frame) | 1963 (or (frame-live-p quail-guidance-frame) |