;;; quail.el --- provides simple input method for multilingual text
-;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2011 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010
+;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; CONVERSION-KEYS argument of the Quail package.
;; [There was an input method for Mule 2.3 called `Tamago' from the
-;; Japanese `TAkusan MAtasete GOmenasai', or `Sorry for having you
+;; Japanese `TAkusan MAtasete GOmen-nasai', or `Sorry for having you
;; wait so long'; this couldn't be included in Emacs 20. `Tamago' is
;; Japanese for `egg' (implicitly a hen's egg). Handa-san made a
;; smaller and simpler system; the smaller quail egg is also eaten in
")
'("pc105-uk" . "\
\
-`\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \
+`\2541!2\"3\2434$5%6^7&8*9(0)-_=+ \
qQwWeErRtTyYuUiIoOpP[{]} \
aAsSdDfFgGhHjJkKlL;:'@#~ \
\\|zZxXcCvVbBnNmM,<.>/? \
(setq translation (aref (cdr translation) 0))
(setq translation " ")))
(setq done-list (cons translation done-list)))
- (setq translation ch))
+ (setq translation (aref kbd-layout i)))
(aset layout i translation))
(setq i (1+ i)))
(bar "|")
lower upper row)
;; Make table without horizontal lines. Each column for a key
- ;; has the form "| LU |" where L is for lower key and and U is
+ ;; has the form "| LU |" where L is for lower key and U is
;; for a upper key. If width of L (U) is greater than 1,
;; preceding (following) space is not inserted.
(put-text-property 0 1 'face 'bold bar)
(set-buffer-modified-p modified-p)
(quail-show-guidance)
(let* ((prompt (if input-method-use-echo-area
- (format "%s%s %s"
+ (format "%s%s %s"
(or input-method-previous-message "")
quail-current-str
quail-guidance-str)))
(quail-setup-overlays nil)))
(quail-show-guidance)
(let* ((prompt (if input-method-use-echo-area
- (format "%s%s%s %s"
+ (format "%s%s%s %s"
(or input-method-previous-message "")
quail-conversion-str
quail-current-str
(set-window-dedicated-p win t))
(quail-minibuffer-message
(format " [%s]" current-input-method-title)))
- ;; Show the guidance in the next line of the currrent
+ ;; Show the guidance in the next line of the current
;; minibuffer.
(quail-minibuffer-message
(format " [%s]\n%s"
(- quail-guidance-translations-starting-column
7 (string-width str))
32))))
- (setq str (format "%s(%02d/%s)"
+ (setq str (format "%s(%02d/%s)"
str (nth 3 indices)
(if (nth 4 indices)
(format "%02d" (nth 4 indices))
(trans (aref (cdr quail-current-translations) idx)))
(or (stringp trans)
(setq trans (string trans)))
- (setq str (format "%s %d.%s"
+ (setq str (format "%s %d.%s"
str
(if (= (- idx start) 9) 0
(1+ (- idx start)))
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook)
(let ((buffer (window-buffer))
- choice
- base-size)
+ choice)
(with-current-buffer (window-buffer (posn-window (event-start event)))
(if completion-reference-buffer
(setq buffer completion-reference-buffer))
- (setq base-size completion-base-size)
(save-excursion
(goto-char (posn-point (event-start event)))
(let (beg end)
(setq end (or (next-single-property-change end 'mouse-face)
(point-max)))
(setq choice (buffer-substring beg end)))))
-; (let ((owindow (selected-window)))
-; (select-window (posn-window (event-start event)))
-; (if (and (one-window-p t 'selected-frame)
-; (window-dedicated-p (selected-window)))
-; ;; This is a special buffer's frame
-; (iconify-frame (selected-frame))
-; (or (window-dedicated-p (selected-window))
-; (bury-buffer)))
-; (select-window owindow))
+ ;; (let ((owindow (selected-window)))
+ ;; (select-window (posn-window (event-start event)))
+ ;; (if (and (one-window-p t 'selected-frame)
+ ;; (window-dedicated-p (selected-window)))
+ ;; ;; This is a special buffer's frame
+ ;; (iconify-frame (selected-frame))
+ ;; (or (window-dedicated-p (selected-window))
+ ;; (bury-buffer)))
+ ;; (select-window owindow))
(quail-delete-region)
- (quail-choose-completion-string choice buffer base-size)
+ (setq quail-current-str choice)
+ ;; FIXME: We need to pass `base-position' here.
+ ;; FIXME: why do we need choose-completion-string with all its
+ ;; completion-specific logic?
+ (choose-completion-string choice buffer)
(quail-terminate-translation)))
-;; BASE-SIZE here is for compatibility with an (unused) arg of a
-;; previous implementation.
-(defun quail-choose-completion-string (choice &optional buffer base-size)
- (setq quail-current-str choice)
- ;; FIXME: We need to pass `base-position' here.
- (choose-completion-string choice buffer))
-
(defun quail-build-decode-map (map-list key decode-map num
&optional maxnum ignores)
"Build a decoding map.
(define-button-type 'quail-keyboard-layout-button
:supertype 'help-xref
- 'help-function '(lambda (layout)
- (help-setup-xref `(quail-keyboard-layout-button ,layout)
- nil)
- (quail-show-keyboard-layout layout))
+ 'help-function (lambda (layout)
+ (help-setup-xref `(quail-keyboard-layout-button ,layout)
+ nil)
+ (quail-show-keyboard-layout layout))
'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
(define-button-type 'quail-keyboard-customize-button
(put 'quail-decode-map 'char-table-extra-slots 0)
-;; Generate a halfly-cooked decode map (char-table) for the current
+;; Generate a half-cooked decode map (char-table) for the current
;; Quail map. An element for a character C is a key string or a list
-;; of a key strings to type to input C. The lenth of key string is at
+;; of a key strings to type to input C. The length of key string is at
;; most 2. If it is 2, more keys may be required to input C.
(defun quail-gen-decode-map ()
(cdr decode-map)))
(let ((key-head (aref decode-map char)))
(if (stringp key-head)
- (setq key-list (quail-find-key1
+ (setq key-list (quail-find-key1
(quail-lookup-key key-head nil t)
key-head char nil))
(mapc #'(lambda (elt)
TRANSITION-n-m are transition rules from STATE-n, and have the form
\(RULES . STATE-x) or RULES, where STATE-x is one of STATE-n above,
RULES is a symbol whose value is an alist of keys \(string) vs the
-correponding characters or strings. The format of the symbol value of
+corresponding characters or strings. The format of the symbol value of
RULES is the same as arguments to `quail-define-rules'.
If TRANSITION-n-m has the form (RULES . STATE-x), it means that
function `quail-install-map' (which see)."
(let ((state-alist (mapcar (lambda (x) (list (car x))) table))
tail elt)
- ;; STATE-ALIST is an alist of states vs the correponding sub Quail
+ ;; STATE-ALIST is an alist of states vs the corresponding sub Quail
;; map. It is now initialized to ((STATE-0) (STATE-1) ...).
;; Set key sequence mapping rules in cdr part of each element.
(while table
(if (not (re-search-forward leim-list-entry-regexp nil t))
nil
- ;; Remove garbages after the header.
+ ;; Remove garbage after the header.
(goto-char (match-beginning 0))
(if (< pos (point))
(delete-region pos (point)))
;;
(provide 'quail)
-;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886
;;; quail.el ends here