Function: quail-translation-help

quail-translation-help is an interactive and byte-compiled function defined in quail.el.gz.

Signature

(quail-translation-help)

Documentation

Show help message while translating in Quail input method.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
(defun quail-translation-help ()
  "Show help message while translating in Quail input method."
  (interactive)
  (if (not (eq this-command last-command))
      (let (state-msg keymap)
	(if (and quail-converting (= (length quail-current-key) 0))
	    (setq state-msg
		  (format "Converting string %S by input method %S.\n"
			  quail-conversion-str (quail-name))
		  keymap (quail-conversion-keymap))
	  (setq state-msg
		(format "Translating key sequence %S by input method %S.\n"
			quail-current-key (quail-name))
		keymap (quail-translation-keymap)))
	(with-output-to-temp-buffer "*Help*"
	  (with-current-buffer standard-output
	    (insert state-msg)
	    (quail-help-insert-keymap-description
	     keymap
	     "-----------------------\n")
	    ;; Isn't this redundant ?  -stef
	    (help-mode)))))
  (let (scroll-help)
    (save-selected-window
      (select-window (get-buffer-window "*Help*"))
      (if (eq this-command last-command)
	  (if (< (window-end) (point-max))
	      (scroll-up)
	    (if (> (window-start) (point-min))
		(set-window-start (selected-window) (point-min)))))
      (setq scroll-help
	    (if (< (window-end (selected-window) 'up-to-date) (point-max))
		"Type \\[quail-translation-help] to scroll up the help"
	      (if (> (window-start) (point-min))
		  "Type \\[quail-translation-help] to see the head of help"))))
    (if scroll-help
	(progn
	  (message "%s" (substitute-command-keys scroll-help))
	  (sit-for 1)
	  (message nil)
	  (quail-update-guidance)
	  ))))