From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: [jeff.dwork@amd.com: Re: customize] Date: Mon, 16 Sep 2002 18:01:27 +0200 Organization: The Church of Emacs Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032192274 16772 127.0.0.1 (16 Sep 2002 16:04:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Sep 2002 16:04:34 +0000 (UTC) Cc: emacs-devel@gnu.org, "jeff.dwork@amd.com": Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17qyMS-0004MO-00 for ; Mon, 16 Sep 2002 18:04:32 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17qyzr-0004rx-00 for ; Mon, 16 Sep 2002 18:45:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qyMh-00068U-00; Mon, 16 Sep 2002 12:04:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17qyJc-0005yY-00 for emacs-devel@gnu.org; Mon, 16 Sep 2002 12:01:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17qyJa-0005yB-00 for emacs-devel@gnu.org; Mon, 16 Sep 2002 12:01:35 -0400 Original-Received: from sheridan.dina.kvl.dk ([130.225.40.227]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17qyJX-0005xQ-00; Mon, 16 Sep 2002 12:01:32 -0400 Original-Received: from zuse.dina.kvl.dk (zuse.dina.kvl.dk [130.225.40.245]) by sheridan.dina.kvl.dk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id SAA17076; Mon, 16 Sep 2002 18:01:30 +0200 Original-Received: (from abraham@localhost) by zuse.dina.kvl.dk (8.9.3+Sun/8.9.3) id SAA12222; Mon, 16 Sep 2002 18:01:28 +0200 (MEST) X-Authentication-Warning: zuse.dina.kvl.dk: abraham set sender to abraham@dina.kvl.dk using -f Original-To: rms@gnu.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: (Richard Stallman's message of "Mon, 16 Sep 2002 11:16:53 -0400") Original-Lines: 40 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7951 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7951 Richard Stallman 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)