]> git.eshelyaron.com Git - emacs.git/commitdiff
2002-02-12 Per Abrahamsen <abraham@dina.kvl.dk>
authorPer Abrahamsen <abraham@dina.kvl.dk>
Tue, 12 Feb 2002 09:49:46 +0000 (09:49 +0000)
committerPer Abrahamsen <abraham@dina.kvl.dk>
Tue, 12 Feb 2002 09:49:46 +0000 (09:49 +0000)
* menu-bar.el (menu-bar-options-save): Only save
`current-language-environment' and `default-input-method' when
marked as customized.

* international/mule-cmds.el
(setup-specified-language-environment): Mark
`current-language-environment' as customized.
(set-input-method): Mark
`default-input-method' as customized when called interactively.
(toggle-input-method): Ditto.

lisp/ChangeLog
lisp/international/mule-cmds.el
lisp/menu-bar.el

index 03a23d7bdc2c6b29312a2f51da933516227e8dae..16d6cd9207af631b722dbcfc39923a36dc8eb988 100644 (file)
@@ -1,3 +1,16 @@
+2002-02-12  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * menu-bar.el (menu-bar-options-save): Only save
+       `current-language-environment' and `default-input-method' when
+       marked as customized.
+
+       * international/mule-cmds.el
+       (setup-specified-language-environment): Mark
+       `current-language-environment' as customized.
+       (set-input-method): Mark
+       `default-input-method' as customized when called interactively.
+       (toggle-input-method): Ditto.
+
 2002-02-11  Colin Walters  <walters@verbum.org>
 
        * ibuffer.el (ibuffer-switch-format): Supply required argument for
index 918076672b8f28e039b5ef311b9fd0ebba816324..37bcddfef4e20db621adf916d204061de893d0ea 100644 (file)
@@ -1103,7 +1103,10 @@ To deactivate it programmatically, use \\[inactivate-input-method]."
            (if default "Select input method (default %s): " "Select input method: ")
            default t))))
   (activate-input-method input-method)
-  (setq default-input-method input-method))
+  (setq default-input-method input-method)
+  (when (interactive-p)
+    (customize-mark-as-set 'default-input-method))
+  default-input-method)
 
 (defun toggle-input-method (&optional arg)
   "Enable or disable multilingual text input method for the current buffer.
@@ -1134,8 +1137,11 @@ and enable that one.  The default is the most recent input method specified
              (if default "Input method (default %s): " "Input method: " )
              default t))
         default))
-      (or default-input-method
-         (setq default-input-method current-input-method)))))
+      (unless default-input-method
+       (prog1 
+           (setq default-input-method current-input-method)
+         (when (interactive-p)
+           (customize-mark-as-set 'default-input-method)))))))
 
 (defun describe-input-method (input-method)
   "Describe input method INPUT-METHOD."
@@ -1297,7 +1303,9 @@ This hook is mainly used for canceling the effect of
             (or (not (eq last-command-event 'Default))
                 (setq last-command-event 'English))
             (setq language-name (symbol-name last-command-event)))
-       (set-language-environment language-name)
+       (prog1
+           (set-language-environment language-name)
+         (customize-mark-as-set 'current-language-environment))
       (error "Bogus calling sequence"))))
 
 (defcustom current-language-environment "English"
index 4c8c2a5c2eb72e729b6d2696e32b22ab28cce9d5..5ae7de6b97800a78cf90176b2c550990f6f4e4c2 100644 (file)
@@ -569,6 +569,7 @@ Do the same for the keys of the same name."
                   case-fold-search truncate-lines show-paren-mode
                   transient-mark-mode global-font-lock-mode
                   display-time-mode auto-compression-mode
+                  current-language-environment default-input-method
                   ;; Saving `text-mode-hook' is somewhat questionable,
                   ;; as we might get more than we bargain for, if
                   ;; other code may has added hooks as well.
@@ -579,10 +580,6 @@ Do the same for the keys of the same name."
       (and (get elt 'customized-value)
           (customize-mark-to-save elt)
           (setq need-save t)))
-    ;; These are set with other functions.
-    (dolist (elt '(current-language-environment default-input-method))
-      (when (customize-mark-to-save elt)
-       (setq need-save t)))
     ;; Save if we changed anything.
     (when need-save
       (custom-save-all))))