From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: custom-set-variables fails to set variable Date: Sat, 12 Nov 2005 16:21:52 -0500 Message-ID: References: <11859.1131656026@olgas.newt.com> <87lkzwxduk.fsf@olgas.newt.com> <200511110043.jAB0hhc17895@raven.dms.auburn.edu> <200511120441.jAC4fJI25860@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1131830621 10216 80.91.229.2 (12 Nov 2005 21:23:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 12 Nov 2005 21:23:41 +0000 (UTC) Cc: p.galbraith@globetrotter.net, wohler@newt.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 12 22:23:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eb2pR-0006Pz-TE for ged-emacs-devel@m.gmane.org; Sat, 12 Nov 2005 22:22:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eb2pR-0003sN-AE for ged-emacs-devel@m.gmane.org; Sat, 12 Nov 2005 16:22:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eb2os-0003iq-2i for emacs-devel@gnu.org; Sat, 12 Nov 2005 16:21:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eb2or-0003iH-3O for emacs-devel@gnu.org; Sat, 12 Nov 2005 16:21:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eb2oq-0003iC-Us for emacs-devel@gnu.org; Sat, 12 Nov 2005 16:21:52 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eb2oq-0002zT-V8 for emacs-devel@gnu.org; Sat, 12 Nov 2005 16:21:53 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Eb2oq-0002zW-6Y; Sat, 12 Nov 2005 16:21:52 -0500 Original-To: Luc Teirlinck In-reply-to: <200511120441.jAC4fJI25860@raven.dms.auburn.edu> (message from Luc Teirlinck on Fri, 11 Nov 2005 22:41:19 -0600 (CST)) 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: news.gmane.org gmane.emacs.devel:45842 Archived-At: A more automatic solution could be: define-derived-mode could automatically produce an autoload definition of the defvar. That would solve the problem, right? It is not normal for update-file-autoloads to generate an autoload with no autoload cookie, but we could do that. Unless I am confused, this also has the disadvantage that it is not going to work for uses of define-derived-mode in third party packages. You are right. So that approach won't work. Meanwhile, another point occurs to me. Why is the defvar that comes from the define-derived-mode executed before the defcustom? Could that be solved by putting the defcustom earlier in the file? Another idea: replace the defvar with a put call that will put on a variable-documentation property. Yes, but both the manual and the automated solutions have the potential for problems. Somebody supplying a defcustom may want a tailor-made docstring for the defcustom, mentioning typical uses for the hook and the defvar's docstring could overwrite that. We don't want the automatically generated doc string to override an explicit one, so perhaps the define-derived-mode should generate (unless (get VAR 'variable-documentation) (put VAR 'variable-documentation STRING))