[Top][All Lists]

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

Re: multiple queries to delete excess backup version w/ custom

From: Tom Tromey
Subject: Re: multiple queries to delete excess backup version w/ custom
Date: Sat, 05 Jan 2008 11:42:42 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux)

>>>>> "martin" == martin rudalics <address@hidden> writes:

martin> Could you please try to edebug `Custom-save' and/or
martin> `custom-save-all' to find out why and how it's getting called
martin> repeatedly.  This should get fixed for Emacs 22.2.

I read through the code a little.

Custom-save does this:

           (lambda (child)
             (when (memq (widget-get child :custom-state)
                         '(modified set changed rogue))
               (widget-apply child :custom-save)))
           "Save all settings in this buffer? " t)

Which, AFAICT, means "send the :custom-save message to each modified

Searching for :custom-save shows that it maps to things like
custom-variable-save, custom-face-save, etc.

Looking at custom-variable-save, it calls custom-save-all toward the
end.  I suppose this makes sense because you can save a single setting
via the State menu.

At least, that's my analysis.  I'm sorry, but I didn't actually step
through with the debugger.

I can think of a few ways to fix this.

One idea would be a global which tells custom-save-all not to call
save-buffer.  Then, bind this when sending :custom-save to the widgets
in Custom-save.

Another idea would be to turn off backups for the custom file, or to
otherwise arrange not to ask the user questions when saving.


reply via email to

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