[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: Save Options vs. default-input-method
From: |
Per Abrahamsen |
Subject: |
Re: [PATCH] Re: Save Options vs. default-input-method |
Date: |
Tue, 12 Feb 2002 10:56:04 +0100 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i686-pc-linux-gnu) |
Per Abrahamsen <address@hidden> writes:
> Ok, I commited a patch below. It makes all the non-mule options use
> customize-set-variable or equivalent, and makes 'Save options' only
> save those options modified by customize-set-variable or equivalent.
I fixed the MULE options as well. Now none of the options get saved,
unless you have changed them interactively.
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs//emacs/lisp/ChangeLog,v
retrieving revision 1.3436
diff -c -r1.3436 ChangeLog
*** lisp/ChangeLog 12 Feb 2002 04:50:04 -0000 1.3436
--- lisp/ChangeLog 12 Feb 2002 09:45:23 -0000
***************
*** 1,3 ****
--- 1,16 ----
+ 2002-02-12 Per Abrahamsen <address@hidden>
+
+ * 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 <address@hidden>
* ibuffer.el (ibuffer-switch-format): Supply required argument for
Index: lisp/menu-bar.el
===================================================================
RCS file: /cvsroot/emacs//emacs/lisp/menu-bar.el,v
retrieving revision 1.198
diff -c -r1.198 menu-bar.el
*** lisp/menu-bar.el 11 Feb 2002 16:47:55 -0000 1.198
--- lisp/menu-bar.el 12 Feb 2002 09:45:23 -0000
***************
*** 569,574 ****
--- 569,575 ----
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,588 ****
(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))))
--- 580,585 ----
Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /cvsroot/emacs//emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.183
diff -c -r1.183 mule-cmds.el
*** lisp/international/mule-cmds.el 8 Feb 2002 11:59:42 -0000 1.183
--- lisp/international/mule-cmds.el 12 Feb 2002 09:45:23 -0000
***************
*** 1103,1109 ****
(if default "Select input method (default %s): " "Select input
method: ")
default t))))
(activate-input-method input-method)
! (setq default-input-method input-method))
(defun toggle-input-method (&optional arg)
"Enable or disable multilingual text input method for the current buffer.
--- 1103,1112 ----
(if default "Select input method (default %s): " "Select input
method: ")
default t))))
(activate-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,1141 ****
(if default "Input method (default %s): " "Input method: " )
default t))
default))
! (or default-input-method
! (setq default-input-method current-input-method)))))
(defun describe-input-method (input-method)
"Describe input method INPUT-METHOD."
--- 1137,1147 ----
(if default "Input method (default %s): " "Input method: " )
default t))
default))
! (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,1303 ****
(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)
(error "Bogus calling sequence"))))
(defcustom current-language-environment "English"
--- 1303,1311 ----
(or (not (eq last-command-event 'Default))
(setq last-command-event 'English))
(setq language-name (symbol-name last-command-event)))
! (prog1
! (set-language-environment language-name)
! (customize-mark-as-set 'current-language-environment))
(error "Bogus calling sequence"))))
(defcustom current-language-environment "English"
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, (continued)
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, Richard Stallman, 2002/02/07
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, Per Abrahamsen, 2002/02/07
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, Richard Stallman, 2002/02/08
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, Per Abrahamsen, 2002/02/09
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, Richard Stallman, 2002/02/10
- Re: [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook, ShengHuo ZHU, 2002/02/13
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/05
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/07
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/07
- Message not available
- Message not available
- Message not available
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/11
- Re: [PATCH] Re: Save Options vs. default-input-method,
Per Abrahamsen <=
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/13
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/12
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/12
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/12
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/12
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/13
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/14
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/15
- Re: [PATCH] Re: Save Options vs. default-input-method, Per Abrahamsen, 2002/02/17
- Re: [PATCH] Re: Save Options vs. default-input-method, Richard Stallman, 2002/02/17