From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Changes in the arg list for custom-set-variables - how should it be handled Date: Mon, 06 Dec 2004 23:24:07 -0500 Message-ID: References: <007c01c4da6a$ae922b60$0200a8c0@sedrcw11488> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1102393687 2876 80.91.229.6 (7 Dec 2004 04:28:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2004 04:28:07 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 07 05:28:02 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 1CbWxG-0007Eh-00 for ; Tue, 07 Dec 2004 05:28:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CbX72-0005yZ-Nh for ged-emacs-devel@m.gmane.org; Mon, 06 Dec 2004 23:38:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CbX6p-0005xj-S5 for emacs-devel@gnu.org; Mon, 06 Dec 2004 23:37:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CbX6m-0005w3-HV for emacs-devel@gnu.org; Mon, 06 Dec 2004 23:37:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CbX6m-0005w0-Ev for emacs-devel@gnu.org; Mon, 06 Dec 2004 23:37:52 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CbWwk-0003fq-1J for emacs-devel@gnu.org; Mon, 06 Dec 2004 23:27:30 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CbWtT-0001Sx-Cu; Mon, 06 Dec 2004 23:24:07 -0500 Original-To: "Lennart Borgman" In-reply-to: <007c01c4da6a$ae922b60$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se) 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:30789 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30789 I have seen that there are some changes in the arg list for custom-set-variables from the current Emacs to CVS Emacs. For example for global-font-lock-mode: '(global-font-lock-mode t nil (font-lock)) should be changed too '(global-font-lock-mode t nil (font-core)) Stephan Stahl pointed out that the user does not need to make this change, but that the new form, when written by Emacs, could make the init file fail to load in older Emacs versions. This kind of thing occurs when :require is used in the defcustom macro. In this case it results from the following code in define-minor-mode: ,@(cond ((not (and curfile require)) nil) ((not (eq require t)) `(:require ,require)) (t `(:require ',(intern (file-name-nondirectory (file-name-sans-extension curfile)))))) This puts a :require into the defcustom generated for the minor mode. The result is that loading the setting of the variable forces loading of the file the variable is defined in. I suppose the reason for this is so that the :set function can work right, but in the case of global-font-lock-mode it is unnecessary since font-core.el is preloaded. In cases where such a definition is autoloaded instead, autoload.el could set up something to record the necessary information elsewhere, so that setting the variable will load the right files. That way, it won't have to be recorded in the custom-set-variables call, and this problem will not happen. Would someone like to work on this? Please respond if you want to do it.