Restore comma mistakenly removed in last change.
[bpt/emacs.git] / leim / quail / uni-input.el
index 12b93dc..88f5ec6 100644 (file)
@@ -1,6 +1,10 @@
 ;;; uni-input.el --- Hex Unicode input method
 
-;; Copyright (C) 2001  Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;;   Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007
+;;   National Institute of Advanced Industrial Science and Technology (AIST)
+;;   Registration Number H14PRO021
 
 ;; Author: Dave Love <fx@gnu.org>
 ;; Keywords: i18n
@@ -9,7 +13,7 @@
 
 ;; This file is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; This file is distributed in the hope that it will be useful,
@@ -19,8 +23,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
                      (progn
                        (push key events)
                        (ucs-input-insert-char key))
-                   (let ((last-command-char key)
-                         (current-prefix-arg))
-                     (condition-case nil
-                         (call-interactively (key-binding seq))))
                    (quail-delete-region)
                    (throw 'non-digit (append (reverse events)
                                              (listify-key-sequence seq))))))
              (let* ((n (string-to-number (apply 'string
                                                 (cdr (nreverse events)))
                                          16))
-                    (c (decode-char 'ucs n))
-                    (status (make-vector 9 nil)))
+                    (c (decode-char 'ucs n)))
                (if c
                    (list c)
-                 (aset status 0 n)
-                 (string-to-list (ccl-execute-on-string
-                                  'utf-8-ccl-encode status ""))))))
+                 ;; The intention of the following code is to insert
+                 ;; a correct UTF-8 sequence by raw bytes, but
+                 ;; currently it doesn't work.
+                 ;; (let ((status (make-vector 9 nil)))
+                 ;;   (aset status 0 n)
+                 ;;   (string-to-list (ccl-execute-on-string
+                 ;;                    'utf-8-ccl-encode status "")))
+                 (error "Character U+%04X is not yet supported" n)))))
        (quail-delete-overlays)
        (set-buffer-modified-p modified-p)
        (run-hooks 'input-method-after-insert-chunk-hook)))))
@@ -138,7 +142,6 @@ While this input method is active, the variable
     (quail-delete-overlays)
     (if (eq (selected-window) (minibuffer-window))
        (add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))
-    (add-hook 'kill-buffer-hook 'quail-kill-guidance-buf nil t)
     (set (make-local-variable 'input-method-function)
         'ucs-input-method)))
 
@@ -151,7 +154,7 @@ While this input method is active, the variable
   (interactive)
   (with-output-to-temp-buffer "*Help*"
     (princ "\
-Input method: ucs (mode line indicator:U)
+Input method: ucs (mode line indicator:U+)
 
 Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number.")))