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 22:54:02 +0100 Message-ID: <20060703215402.GA1669@muc.de> References: <20060702133304.GA4008@muc.de> <20060702191851.GA1299@muc.de> <20060703171606.GD2626@muc.de> <87irmer51p.fsf@thunk.shootybangbang.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1151962224 20152 80.91.229.2 (3 Jul 2006 21:30:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2006 21:30:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 03 23:30:20 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 1FxVzi-0007Is-KD for ged-emacs-devel@m.gmane.org; Mon, 03 Jul 2006 23:30:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxVzi-0005wm-35 for ged-emacs-devel@m.gmane.org; Mon, 03 Jul 2006 17:30:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FxVzJ-0005mT-SS for emacs-devel@gnu.org; Mon, 03 Jul 2006 17:29:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FxVzI-0005lW-5g for emacs-devel@gnu.org; Mon, 03 Jul 2006 17:29:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxVzI-0005lR-0o for emacs-devel@gnu.org; Mon, 03 Jul 2006 17:29:48 -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 1FxWCo-0005ga-Q5 for emacs-devel@gnu.org; Mon, 03 Jul 2006 17:43:47 -0400 Original-Received: (qmail 60242 invoked from network); 3 Jul 2006 21:29:44 -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 21:29:44 -0000 Original-Received: from acm by localhost.localdomain with local (Exim 4.50) id 1FxWMk-0000VL-IT; Mon, 03 Jul 2006 22:54:02 +0100 Original-To: John Paul Wallington Content-Disposition: inline In-Reply-To: <87irmer51p.fsf@thunk.shootybangbang.com> 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:56440 Archived-At: On Mon, Jul 03, 2006 at 06:06:58PM +0100, John Paul Wallington wrote: > Alan Mackenzie writes: > > ;; 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) > > .... > > )) > How about getting rid of the (eval-after-load "edebug" '(progn ... )) > form and instead replacing the `def-edebug-spec' calls with (put > 'mumble 'edebug-form-spec 'spec) at toplevel ? Or alternatively > having those `def-edebug-spec' calls appear at toplevel where they > would be expanded to `put' calls when compiled provided that > `def-edebug-spec' is defined (untested) ? Ah, thanks! So the thing to do would be to load edebug at compile time, and expand the `def-edebug-spec' macros at compile time. This would surely work. Well, it will work if we can guarantee that every Emacs where somebody's going to be installing CC Mode _has_ edebug. Or putting in another wearisome check for it. But.... What's wrong with the `eval-after-load' call as it stands? Making this change would entail checking that it works with at least 4 versions of Emacs and XEmacs. That might not be much work, but it's a lot more than none at all. With the paperwork in committing the changes, we could be talking about 2 - 4 hours to do this. Why? -- Alan.