unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: [PATCH] Re: Save Options vs. default-input-method
Date: Tue, 12 Feb 2002 10:56:04 +0100	[thread overview]
Message-ID: <rjeljrxbuz.fsf@ssv2.dina.kvl.dk> (raw)
In-Reply-To: <rj1yfslz30.fsf@ssv2.dina.kvl.dk> (Per Abrahamsen's message of "Mon, 11 Feb 2002 18:15:15 +0100")

Per Abrahamsen <abraham@dina.kvl.dk> 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  <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: 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"

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-02-12  9:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3665k6ayy.fsf@Janik.cz>
     [not found] ` <200201302237.g0UMb1d24844@aztec.santafe.edu>
     [not found]   ` <m3sn8jbzs6.fsf@Janik.cz>
     [not found]     ` <200202040927.g149RUF02434@aztec.santafe.edu>
     [not found]       ` <m3ofj5fs5i.fsf@Janik.cz>
     [not found]         ` <rjbsf57anr.fsf@ssv2.dina.kvl.dk>
     [not found]           ` <200202051248.g15CmDb02207@aztec.santafe.edu>
     [not found]             ` <rju1svzxxx.fsf@ssv2.dina.kvl.dk>
2002-02-07 14:57               ` [PATCH] Re: Save Options vs. default-input-method Richard Stallman
2002-02-07 17:41                 ` Per Abrahamsen
2002-02-07 21:15                   ` Pavel Janík
2002-02-08  7:50                     ` Per Abrahamsen
2002-02-07 14:57               ` Richard Stallman
2002-02-07 16:50                 ` Per Abrahamsen
2002-02-08 23:23                   ` Richard Stallman
     [not found]               ` <rjpu3jzwyd.fsf_-_@ssv2.dina.kvl.dk>
2002-02-07 14:57                 ` [PATCH] text-mode-hook-identify should be part of the standard value for text-mode-hook Richard Stallman
2002-02-07 16:27                   ` Per Abrahamsen
2002-02-08 23:23                     ` Richard Stallman
2002-02-09 11:38                       ` Per Abrahamsen
2002-02-11  2:08                         ` Richard Stallman
2002-02-13 18:04                           ` ShengHuo ZHU
     [not found]               ` <rjlme7zwja.fsf@ssv2.dina.kvl.dk>
2002-02-07 14:57                 ` [PATCH] Re: Save Options vs. default-input-method Richard Stallman
2002-02-07 16:31                   ` Per Abrahamsen
     [not found]                     ` <200202100517.g1A5Hoe06105@aztec.santafe.edu>
     [not found]                       ` <rjlme17mhm.fsf@ssv2.dina.kvl.dk>
     [not found]                         ` <200202110209.g1B29mh06648@aztec.santafe.edu>
2002-02-11 17:15                           ` Per Abrahamsen
2002-02-12  9:56                             ` Per Abrahamsen [this message]
2002-02-13 15:38                               ` Richard Stallman
2002-02-12 15:23                             ` Richard Stallman
2002-02-12 16:39                               ` Per Abrahamsen
2002-02-12 15:23                             ` Richard Stallman
2002-02-12 16:24                               ` Per Abrahamsen
2002-02-14  3:11                                 ` Richard Stallman
2002-02-14  9:34                                   ` Per Abrahamsen
2002-02-15 10:36                                     ` Richard Stallman
2002-02-17 10:31                                       ` Per Abrahamsen
2002-02-17 22:50                                         ` Richard Stallman
2002-02-19 10:31                                           ` Per Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rjeljrxbuz.fsf@ssv2.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).