Fix typos.
[bpt/emacs.git] / lisp / international / quail.el
index 2174beb..bdbf2c0 100644 (file)
@@ -43,7 +43,7 @@
 ;; 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
@@ -818,7 +818,7 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
          (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)
@@ -1377,7 +1377,7 @@ Return the input string."
          (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)))
@@ -1443,7 +1443,7 @@ Return the input string."
                (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
@@ -2011,7 +2011,7 @@ minibuffer and the selected frame has no other windows)."
                 (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"
@@ -2125,7 +2125,7 @@ minibuffer and the selected frame has no other windows)."
                               (- 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))
@@ -2135,7 +2135,7 @@ minibuffer and the selected frame has no other windows)."
                    (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)))
@@ -2253,12 +2253,10 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
   ;; 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)
@@ -2272,26 +2270,23 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
          (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.
@@ -2458,10 +2453,10 @@ should be made by `quail-build-decode-map' (which see)."
 
 (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
@@ -2792,7 +2787,7 @@ If CHAR is an ASCII character and can be input by typing itself, return t."
                (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)