From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: obsolete comment in tool-bar.el Date: Fri, 15 Jul 2005 17:46:49 -0500 (CDT) Message-ID: <200507152246.j6FMknc13375@raven.dms.auburn.edu> References: <200507071915.j67JFZT29961@raven.dms.auburn.edu> <200507090235.j692ZER04883@raven.dms.auburn.edu> <200507110321.j6B3LgG09526@raven.dms.auburn.edu> <85y88dfcqw.fsf@lola.goethe.zz> <200507130302.j6D32qE05640@raven.dms.auburn.edu> <200507140208.j6E28tr08794@raven.dms.auburn.edu> <200507141830.j6EIU5r11167@raven.dms.auburn.edu> <878y08k857.fsf-monnier+emacs@gnu.org> <200507151353.j6FDrMf12755@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1121469159 31416 80.91.229.2 (15 Jul 2005 23:12:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2005 23:12:39 +0000 (UTC) Cc: rms@gnu.org, mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 16 01:12:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DtZLJ-0006ZN-Pz for ged-emacs-devel@m.gmane.org; Sat, 16 Jul 2005 01:11:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtZN7-0002Bz-GA for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2005 19:13:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DtZ8C-0002ka-PM for emacs-devel@gnu.org; Fri, 15 Jul 2005 18:58:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DtZ7z-0002f4-Eu for emacs-devel@gnu.org; Fri, 15 Jul 2005 18:57:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtZ7y-0002aw-4C for emacs-devel@gnu.org; Fri, 15 Jul 2005 18:57:54 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DtZ5m-0000jC-83; Fri, 15 Jul 2005 18:55:38 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j6FMkxCK009945; Fri, 15 Jul 2005 17:46:59 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j6FMknc13375; Fri, 15 Jul 2005 17:46:49 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan Monnier on Fri, 15 Jul 2005 16:44:20 -0400) 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:40968 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40968 Can you prevent users and Custom from doing it? If not, the "should not" consideration is fairly meaningless. No code can prevent users from making mistakes. No code can reliably correct user mistakes and I do not believe that one should try to do that. Just alert the user that there may be a problem, but do not blindly try to correct. We _can_ correct bugs in defcustoms included with the Emacs distribution. > Moreover, if it is done before loading the file, it is done before the > define-minor-mode. Of course. I'm not sure why you say it, tho. I must be misunderstanding something. Well there are two problems. The first is : does `define-minor-mode' really need to call the mode function? My remark you quoted is irrelevant to this question. The second question is, _if_ define-minor-mode needs to call the mode function, should the minor mode be called through eval-after-load or should the call to define-minor-mode be postponed until all necessary functions are defined. This problem is what the remark you quoted applies to. I do not immmediately know the answer to the first question, although I am definitely not sure that the answer is yes. The motivation is nowhere pointed out clearly. If the only motivation is to autocorrect user mistakes or bugs in Custom, then I believe that the answer is definitely no. If the motivation is a non-nil standard value (which is relatively rare), you can either take care of this in the :initialize function and document that define-minor-mode should not be called too soon or let the programmer call the mode function near the end of the file and explain how to do that correctly in the docstring. There is no need to automate everything. Sincerely, Luc.