emacs-devel
[Top][All Lists]
Advanced

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

Re: "Save Options" broken (Was; Re: Show/Hide menu)


From: Per Abrahamsen
Subject: Re: "Save Options" broken (Was; Re: Show/Hide menu)
Date: Sun, 03 Feb 2002 17:30:10 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i686-pc-linux-gnu)

address@hidden (Pavel Janík) writes:

> Why we test for default-value here? I must say, that I do not fully
> understand the purpose of this code. Shouldn't we use different function to
> really save options?

[ I didn't write the Options menu code ]

There are bascially two ways to implement the options menu.

1. Use 'customize-set-variable' to set all options in the menu, and
   use 'customize-save-customized' to save them.

2. Use ad hoc code to set the options in the menu, and write code that
   compares the current value of the option with standard-value of the
   option to decide whether to save it or not.  See
   'custom-variable-state-set' for an example of how to check that.

The code in the file seems to attempt #2, except that it seem to
assume the standard value always is nil, and it forgets to "unsave"
the options. 

An advantage of #1 is that it is simpler, the problems with customize
options with :set and :get methods are already taken care of, and the
function to save the option already written.

However, It will save _all_ options that has been set but not saved
using customize, whether from the menus, the customize forms, or from
the minibuffer using M-x customize-set-variable <ret> directly.  And
it will not save options that have been changed from outside
customize.  This might be seen as an advantage or a disadvantage.

I can attempt to fix it either way.



reply via email to

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