emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: customize]


From: Per Abrahamsen
Subject: Re: address@hidden: Re: customize]
Date: Mon, 16 Sep 2002 18:01:41 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8)

Richard Stallman <address@hidden> writes:

> I looked at this message, and then studied custom-save-delete.
> It looks like the reason for this behavior is that custom-save-delete
> only deletes calls to custom-save-variables at top level in the file.

Yes.

> Should we try to make it find and delete calls that are inside other
> constructs? 

No.

However, I believe it would be useful to make custom-save-variables
signal an error if it is called from other places than the top-level.
If that is possible.

> To make that reliable, we would need to prevent it from
> deleting instances of `custom-save-variables' inside strings, or lists
> that have that symbol as car but are not expressions.

The problem is that Jeff's code is just a special case of the more
common:

(if (< emacs-major-version 21)
    ;; Emacs 20 customization.
    (custom-save-variables ...)
  ;; Emacs 21 customization.
  (custom-save-variables ...))

Which is impossible to make robust.  What we should encourage people
who need such functionality to do instead, is

(if (< emacs-major-version 21)
    ;; Emacs 20 customization.
    (setq custom-file "~/.custom-20.el")
  ;; Emacs 21 customization.
  (setq custom-file "~/.custom-21.el"))

(load-file custom-file)




reply via email to

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