From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Change `customize-save-variable' to work under "emacs -Q"? Date: Mon, 11 Jul 2011 23:32:25 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310442405 1191 80.91.229.12 (12 Jul 2011 03:46:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2011 03:46:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 12 05:46:41 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgTvk-0002IE-Ur for ged-emacs-devel@m.gmane.org; Tue, 12 Jul 2011 05:46:41 +0200 Original-Received: from localhost ([::1]:38230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTvi-0004k2-Pd for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2011 23:46:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgTvO-0004jH-0t for emacs-devel@gnu.org; Mon, 11 Jul 2011 23:46:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgTi2-0004Il-Gu for emacs-devel@gnu.org; Mon, 11 Jul 2011 23:33:13 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:35762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgThz-0004H2-OE for emacs-devel@gnu.org; Mon, 11 Jul 2011 23:32:28 -0400 Original-Received: from cpe-66-108-39-217.nyc.res.rr.com ([66.108.39.217]:55812 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QgThy-0004XH-7b; Mon, 11 Jul 2011 23:32:26 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 20389660D5; Mon, 11 Jul 2011 23:32:25 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 10 Jul 2011 14:22:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141965 Archived-At: > Otherwise all the callers end up doing this very awkward thing: > (if (ignore-errors (custom-file)) > (progn > (customize-save-variable 'smtpmail-smtp-server server) > (customize-save-variable 'smtpmail-smtp-service port)) > (setq smtpmail-smtp-server server > smtpmail-smtp-service port)) I'd be surprised if `setq' is the right answer (it's probably more like customize-set or something along these lines), and it deserves a `message', but other than that I guess it's OK. We used to actually save, which resulted in overwriting the user's custom-file with a mostly empty file, so we fixed it by signalling an error, but I guess that just outputting a message and not saving is good enough. Stefan