Mercurial > emacs
changeset 19849:1c5164d81426
(quail-simple): New function.
(quail-require-guidance-buf): New function.
(quail-show-guidance-buf): Do not show guidance buffer if simple
input method is used in the minibuffer.
(quail-update-guidance): Likewise.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 09 Sep 1997 14:57:01 +0000 |
parents | 68c5c0b3ed0d |
children | 6bd245888f10 |
files | lisp/international/quail.el |
diffstat | 1 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/quail.el Tue Sep 09 14:55:29 1997 +0000 +++ b/lisp/international/quail.el Tue Sep 09 14:57:01 1997 +0000 @@ -116,7 +116,7 @@ NAME, TITLE, QUAIL-MAP, GUIDANCE, DOCSTRING, TRANSLATION-KEYS, FORGET-LAST-SELECTION, DETERMINISTIC, KBD-TRANSLATE, SHOW-LAYOUT, DECODE-MAP, MAXIMUM-SHORTEST, OVERLAY-PLIST, UPDATE-TRANSLATION-FUNCTION, - CONVERSION-KEYS. + CONVERSION-KEYS, SIMPLE. QUAIL-MAP is a data structure to map key strings to translations. For the format, see the documentation of `quail-map-p'. @@ -182,6 +182,9 @@ Conversion keymap is a keymap used while conversion region is active but translation region is not active." (nth 14 quail-current-package)) +(defsubst quail-simple () + "Return t if the current Quail package is simple." + (nth 15 quail-current-package)) (defsubst quail-package (name) "Return Quail package named NAME." @@ -455,7 +458,7 @@ forget-last-selection deterministic kbd-translate show-layout (if create-decode-map (list 'decode-map) nil) maximum-shortest overlay-plist update-translation-function - conversion-keymap)) + conversion-keymap simple)) ;; Update input-method-alist. (let ((slot (assoc name input-method-alist)) @@ -1392,6 +1395,13 @@ (setq quail-overlay (make-overlay 1 1)) (overlay-put quail-overlay 'face 'highlight)))) +;; Return t iff the current Quail package requires showing guidance +;; buffer. +(defun quail-require-guidance-buf () + (and input-method-verbose-flag + (not (and (eq (selected-window) (minibuffer-window)) + (quail-simple))))) + (defun quail-show-guidance-buf () "Display a guidance buffer for Quail input method in some window. Create the buffer if it does not exist yet. @@ -1399,10 +1409,7 @@ but if the current buffer is a minibuffer, it is shown in the bottom-most ordinary window of the same frame, or in a newly created frame (if the selected frame has no other windows)." - (if (and (not input-method-verbose-flag) - (eq (selected-window) (minibuffer-window))) - ;; We don't need the guidance buffer. - nil + (when (quail-require-guidance-buf) ;; At first, setup a guidance buffer. (or (buffer-live-p quail-guidance-buf) (setq quail-guidance-buf (generate-new-buffer " *Quail-guidance*"))) @@ -1472,8 +1479,7 @@ (defun quail-update-guidance () "Update the Quail guidance buffer and completion buffer (if displayed now)." ;; Update guidance buffer. - (if (or input-method-verbose-flag - (not (eq (selected-window) (minibuffer-window)))) + (if (quail-require-guidance-buf) (let ((guidance (quail-guidance))) (cond ((or (eq guidance t) (listp guidance))