From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Strange eval-after-load Date: Mon, 3 Jul 2006 18:16:06 +0100 Message-ID: <20060703171606.GD2626@muc.de> References: <20060702133304.GA4008@muc.de> <20060702191851.GA1299@muc.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1151943435 20792 80.91.229.2 (3 Jul 2006 16:17:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2006 16:17:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 03 18:17:12 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FxR6g-0002YA-TA for ged-emacs-devel@m.gmane.org; Mon, 03 Jul 2006 18:17:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxR6g-0001bo-AL for ged-emacs-devel@m.gmane.org; Mon, 03 Jul 2006 12:17:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FxR6U-0001Zy-T9 for emacs-devel@gnu.org; Mon, 03 Jul 2006 12:16:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FxR6U-0001ZO-EP for emacs-devel@gnu.org; Mon, 03 Jul 2006 12:16:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxR6U-0001ZI-6c for emacs-devel@gnu.org; Mon, 03 Jul 2006 12:16:54 -0400 Original-Received: from [193.149.48.1] (helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FxRJx-0002BU-Jb for emacs-devel@gnu.org; Mon, 03 Jul 2006 12:30:50 -0400 Original-Received: (qmail 34718 invoked from network); 3 Jul 2006 16:16:51 -0000 Original-Received: from acm.muc.de (HELO localhost.localdomain) (Debian-exim@193.149.49.134) by mail.muc.de with SMTP; 3 Jul 2006 16:16:51 -0000 Original-Received: from acm by localhost.localdomain with local (Exim 4.50) id 1FxS1m-0002V2-OZ; Mon, 03 Jul 2006 18:16:06 +0100 Original-To: Richard Stallman Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i 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:56429 Archived-At: On Mon, Jul 03, 2006 at 11:05:27AM -0400, Richard Stallman wrote: > I don't think this invalidates my main point, namely that there are valid > uses of eval-after-load. > Perhaps there are some. Anyone who wants to install a call to > eval-after-load should talk with me, so we can see if it really > is necessary -- and so we can maybe implement a way to avoid it. PLEASE, PLEASE, PLEASE give your views on the example I quoted from cc-defs.el. I am getting very frustrated that people seem to be evading my main point, namely that code like ;; Make edebug understand the macros. (eval-after-load "edebug" '(progn (def-edebug-spec cc-eval-when-compile t) (def-edebug-spec c-point t) (def-edebug-spec c-set-region-active t) .... )) is not merely acceptable, but is an epitome of clear and efficient coding. If I am wrong here, then please educate me, bring me to understand HOW I am wrong. Given that CC Mode is intented to be compatible with many (X)Emacs versions, nearly all of which lack the `declare' feature in defmacro, I cannot see how I can get along without eval-after-loads like the above. I do not understand why you regard eval-after-load as objectionable. Just because it can be used in an objectionable fashion does not make it objectionable per se. It seems to me that eval-after-load is essential in the following circumstance: A package (say, CC Mode) must tweak something in an optional library which a user may choose to load (say, font-lock[*] or edebug) in order to work satisfactorally with it. [*] Yes, I know that font-lock is now pre-loaded, but it didn't used to be. I believe that Emacs should NEVER clutter up a user's ram by loading libraries he will not be using. Not edebug, not Info, not Font Lock[*]. Unless there is a better way of doing things, I do not want to take the eval-after-loads out of CC Mode. Please tell me that this is OK. -- Alan.