changeset 19402:b904f6547598

(toggle-input-method) (select-input-method): Always set default-input-method. Show default in the prompt only if there is one. (activate-input-method): Handle the new rule that default-input-method is now global only. (input-method-verbose-flag): Renamed from input-method-tersely-flag and sense inverted. (input-method-highlight-flag): New variable. (toggle-input-method): Pass missing arg to read-input-method-name.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Aug 1997 02:28:28 +0000
parents 2ada2106a39c
children 11d21b4613cd
files lisp/international/mule-cmds.el
diffstat 1 files changed, 33 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Sun Aug 17 23:20:07 1997 +0000
+++ b/lisp/international/mule-cmds.el	Mon Aug 18 02:28:28 1997 +0000
@@ -455,20 +455,17 @@
 
 ;; Actvate INPUT-METHOD.
 (defun activate-input-method (input-method)
-  (if (and current-input-method
-	   (not (string= current-input-method input-method)))
-      (inactivate-input-method))
-  (if current-input-method
-      nil				; We have nothing to do.
+  (when (and current-input-method
+	     (not (string= current-input-method input-method)))
+    (setq previous-input-method current-input-method)
+    (inactivate-input-method))
+  (unless current-input-method
     (let ((slot (assoc input-method input-method-alist)))
       (if (null slot)
 	  (error "Invalid input method `%s'" input-method))
       (apply (nth 2 slot) input-method (nthcdr 5 slot))
       (setq current-input-method input-method)
-      (setq current-input-method-title (nth 3 slot))
-      (if (not (string= default-input-method current-input-method))
-	  (setq previous-input-method default-input-method
-		default-input-method current-input-method)))))
+      (setq current-input-method-title (nth 3 slot)))))
 
 ;; Inactivate the current input method.
 (defun inactivate-input-method ()
@@ -486,9 +483,13 @@
    (let* ((default (or previous-input-method default-input-method)))
      (if (not enable-multibyte-characters)
 	 (error "Can't activate an input method while multibyte characters are disabled"))
-     (list (read-input-method-name "Input method (default %s): " default t))))
+     (list (read-input-method-name
+	    (if default
+		(format "Input method (default %s): " default)
+	      "Input method: ")
+	    default t))))
   (activate-input-method input-method)
-  (setq-default default-input-method default-input-method))
+  (setq default-input-method input-method))
 
 (defun toggle-input-method (&optional arg)
   "Turn on or off a multilingual text input method for the current buffer.
@@ -503,10 +504,14 @@
 	(inactivate-input-method)
       (if (not enable-multibyte-characters)
 	  (error "Can't activate any input method while multibyte characters are disabled"))
-      (activate-input-method
-       (if (or arg (not default-input-method))
-	   (read-input-method-name "Input method (default %s): " default t)  
-	 default-input-method)))))
+      (if (or arg (not default-input-method))
+	  (setq default-input-method
+		(read-input-method-name
+		 (if default
+		     (format "Input method (default %s): " default)
+		   "Input method: ")
+		 default t)))
+      (activate-input-method default-input-method))))
 
 (defun describe-input-method (input-method)
   "Describe the current input method."
@@ -552,11 +557,21 @@
 ;; Variables to control behavior of input methods.  All input methods
 ;; should react to these variables.
 
-(defvar input-method-tersely-flag nil
-  "*If this flag is non-nil, input method works rather tersely.
+(defcustom input-method-verbose-flag t
+  "*If this flag is non-nil, input methods give extra guidance.
 
 For instance, Quail input method does not show guidance buffer while
-inputting at minibuffer if this flag is t.")
+inputting at minibuffer if this flag is t."
+  :type 'boolean
+  :group 'mule)
+
+(defcustom input-method-highlight-flag t
+  "*If this flag is non-nil, input methods highlight partially-entered text.
+For instance, while you are in the middle of a Quail input method sequence,
+the text inserted so far is temporarily underlined.
+The underlining goes away when you finish or abort the input method sequence."
+  :type 'boolean
+  :group 'mule)
 
 (defvar input-method-activate-hook nil
   "Normal hook run just after an input method is activated.")