emacs-devel
[Top][All Lists]
Advanced

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

Re: Save Options vs. default-input-method


From: Pavel Janík
Subject: Re: Save Options vs. default-input-method
Date: Sat, 02 Feb 2002 17:43:05 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: Richard Stallman <address@hidden>
   Date: Wed, 30 Jan 2002 15:37:01 -0700 (MST)

   > Could you possibly debug this?  You're working on related code
   > and I don't know that code more than you do.

Of course.

My original bug-report was:

--- cut here ---
"Save Options" menu-item saves the default value of default-input-method
(which is specified in the language environment) instead of the one you
have chosen in the menu Options / MULE / Select Input Method. This is
confusing. I'd expect that Save Options will save the value I have
specified via the mentioned menu. And even worse (that actually happened to
me): if you already have customized default-input-method in the file
~/.emacs to different value, after running emacs and "Save Options", this
variable will be overwritten with the input-method which is the default for
the language environment you have specified. I do not use the default
input-method as specified via my language environment so I can not use that
menu-item at all :-(

To reproduce (I have tried without any .emacs, without site files etc.):

LANG=cs_CZ emacs

<menu-bar> <options> <mule> <set-input-method>

czech-prog-2

<menu-bar> <options> <save>

Now, my .emacs contains '(default-input-method "czech")) instead of
czech-prog-2 which I would expect.

The same happens if you use different language environment, like with

LANG=ru_RU emacs

The same applies to current CVS HEAD. Any details needed?
--- cut here ---

The problem is, that the menu-item "Save Options" calls
menu-bar-options-save which does the following:

(defun menu-bar-options-save ()
  "Save current values of Options menu items using Custom."
  (interactive)
  (dolist (elt '(
                 [...]
                 current-language-environment default-input-method
                 default-frame-alist))
    (if (default-value elt)
        (customize-save-variable elt (default-value elt))))

Ie. it calls customize-save-variable for current-language-environment and
then for default-input-method. This function contains the following code:

  (funcall (or (get var 'custom-set) 'set-default) var value)

When var is current-language-environment, set-default is
called. 'custom-set of current-language-environment is
set-language-environment which also sets the default-input-method. But it
sets it to the default value of the current-language-environment. In my
case, I use Czech language environment, whose default input method is
"czech". But I use "czech-prog-2".

We can not change the order of current-language-environment,
default-input-method, because then we would save the correct value to
.emacs, but from that time, default-input-method will be changed to default
input-method of the current-language-environment. What is the correct way
of fixing this? This applies to RC as well.
-- 
Pavel Janík

I think I started with hitting C-h a lot.  Really a LOT.
                  -- Kai Grossjohann in gnu.emacs.help about Emacs knowledge



reply via email to

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