emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/international/mule-cmds.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule-cmds.el,v
Date: Thu, 06 Dec 2007 00:46:24 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/12/06 00:46:20

Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -b -r1.315 -r1.316
--- lisp/international/mule-cmds.el     21 Nov 2007 04:55:57 -0000      1.315
+++ lisp/international/mule-cmds.el     6 Dec 2007 00:46:17 -0000       1.316
@@ -1492,6 +1492,9 @@
     (customize-mark-as-set 'default-input-method))
   default-input-method)
 
+(defvar toggle-input-method-active nil
+  "Non-nil inside `toggle-input-method'.")
+
 (defun toggle-input-method (&optional arg interactive)
   "Enable or disable multilingual text input method for the current buffer.
 Only one input method can be enabled at any time in a given buffer.
@@ -1511,9 +1514,12 @@
 which marks the variable `default-input-method' as set for Custom buffers."
 
   (interactive "P\np")
+  (if toggle-input-method-active
+      (error "Recursive use of `toggle-input-method'"))
   (if (and current-input-method (not arg))
       (inactivate-input-method)
-    (let ((default (or (car input-method-history) default-input-method)))
+    (let ((toggle-input-method-active t)
+         (default (or (car input-method-history) default-input-method)))
       (if (and arg default (equal current-input-method default)
               (> (length input-method-history) 1))
          (setq default (nth 1 input-method-history)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]