From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Documentation for custom-file - is not (load custom-file) needed? Date: Wed, 8 Dec 2004 20:56:12 +0100 Message-ID: <004601c4dd60$013b7810$0200a8c0@sedrcw11488> References: <075b01c4d9a4$52799460$0200a8c0@sedrcw11488> <00bb01c4daee$5eb81350$0200a8c0@sedrcw11488> <200412051733.iB5HXIX13206@raven.dms.auburn.edu> <000001c4db1a$8d3770f0$0200a8c0@sedrcw11488> <200412060046.iB60kZj15003@raven.dms.auburn.edu> <003e01c4db31$e45a2550$0200a8c0@sedrcw11488> <200412060402.iB6421q15173@raven.dms.auburn.edu> <200412070539.iB75dV924747@raven.dms.auburn.edu> <03be01c4dcbf$139bfa30$0200a8c0@sedrcw11488> <87is7dienm.fsf@jurta.org> <87u0qwc43f.fsf@jurta.org> <002001c4dd4e$b4578a40$0200a8c0@sedrcw11488> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1102535864 28926 80.91.229.6 (8 Dec 2004 19:57:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2004 19:57:44 +0000 (UTC) Cc: Juri Linkov , Luc Teirlinck , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 08 20:57:36 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cc7wN-0003nL-00 for ; Wed, 08 Dec 2004 20:57:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc86E-0000ix-Vp for ged-emacs-devel@m.gmane.org; Wed, 08 Dec 2004 15:07:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cc85u-0000iL-Qr for emacs-devel@gnu.org; Wed, 08 Dec 2004 15:07:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cc85t-0000hu-KA for emacs-devel@gnu.org; Wed, 08 Dec 2004 15:07:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc85t-0000hO-Hz for emacs-devel@gnu.org; Wed, 08 Dec 2004 15:07:25 -0500 Original-Received: from [81.228.11.114] (helo=av7-2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cc7vS-0006k1-UT for emacs-devel@gnu.org; Wed, 08 Dec 2004 14:56:39 -0500 Original-Received: by av7-2-sn1.fre.skanova.net (Postfix, from userid 502) id E6A5337FFC; Wed, 8 Dec 2004 20:56:37 +0100 (CET) Original-Received: from smtp3-1-sn1.fre.skanova.net (smtp3-1-sn1.fre.skanova.net [81.228.11.163]) by av7-2-sn1.fre.skanova.net (Postfix) with ESMTP id D842337FE7; Wed, 8 Dec 2004 20:56:37 +0100 (CET) Original-Received: from sedrcw11488 (t3o58p3.telia.com [195.252.56.3]) by smtp3-1-sn1.fre.skanova.net (Postfix) with SMTP id 6AF6D37E50; Wed, 8 Dec 2004 20:56:35 +0100 (CET) Original-To: "Stefan Monnier" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:30885 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30885 ----- Original Message ----- From: "Stefan Monnier" > How 'bout something like the following: > > 1 - remove custom-file Yes. > 2 - custom-set-variables does internally: > > (push load-file-name custom-files) Could load-file-name be exchanged with (buffer-file-name) if the user is doing an interactive eval-buffer? > 3 - when saving, if custom-files is nil, use .emacs, if it has length 1, use > (car custom-files), otherwise query the user to know where to save > the settings and whether to remove the settings in the other files. I believe this is a useful idea for cleaning up if the user loads several "custom-files". Maybe this check should be done in custom-set-variable instead of when saving? Or in both places? The reason for doing the check when writing could perhaps be that this might make it easier to write functions later for helping when changing "custom-file". BTW is every occurence of custom-set-variables in "custom-file" deleted before writing the custom-set-variables entry? - Lennart