Merge changes from emacs-23 branch
[bpt/emacs.git] / lisp / international / quail.el
index c8d1083..2174beb 100644 (file)
@@ -1,9 +1,8 @@
 ;;; quail.el --- provides simple input method for multilingual text
 
-;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009  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
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
@@ -663,7 +662,7 @@ This layout is almost the same as that of VT100,
                               ")
    '("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,<.>/?        \
@@ -811,7 +810,7 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
                      (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)))
 
@@ -2242,13 +2241,15 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
 
 (defun quail-mouse-choose-completion (event)
   "Click on an alternative in the `*Quail Completions*' buffer to choose it."
-  (interactive "e")
   ;; This function is an exact copy of the mouse.el function
   ;; `mouse-choose-completion' except that we:
-  ;; 1) add two lines from `choose-completion' in simple.el to give
-  ;;    the `mouse-2' click a little more leeway.
   ;; 2) don't bury *Quail Completions* buffer, so comment a section, and
   ;; 3) delete/terminate the current quail selection here.
+  ;; FIXME: Consolidate with `choose-completion'.  The point number
+  ;; 1 has been done, already.  The point number 3 should be fairly
+  ;; easy to move to a choose-completion-string-function.  So all
+  ;; that's left is point number 2.
+  (interactive "e")
   ;; Give temporary modes such as isearch a chance to turn off.
   (run-hooks 'mouse-leave-buffer-hook)
   (let ((buffer (window-buffer))
@@ -2288,6 +2289,7 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
 ;; 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
@@ -3074,5 +3076,4 @@ call it with one argument STRING."
 ;;
 (provide 'quail)
 
-;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886
 ;;; quail.el ends here