From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Strange eval-after-load Date: Tue, 04 Jul 2006 13:30:17 -0400 Message-ID: References: <20060702133304.GA4008@muc.de> <20060703105727.GA2626@muc.de> <85ac7rouo6.fsf@lola.goethe.zz> <20060703135010.GB2626@muc.de> <20060704080222.GA1316@muc.de> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1152034263 23555 80.91.229.2 (4 Jul 2006 17:31:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jul 2006 17:31:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 04 19:31:01 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 1FxojX-0002YB-6b for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2006 19:30:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FxojW-0007kT-N9 for ged-emacs-devel@m.gmane.org; Tue, 04 Jul 2006 13:30:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fxoj6-0007dX-MB for emacs-devel@gnu.org; Tue, 04 Jul 2006 13:30:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fxoj6-0007cp-3X for emacs-devel@gnu.org; Tue, 04 Jul 2006 13:30:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fxoj5-0007cc-TZ for emacs-devel@gnu.org; Tue, 04 Jul 2006 13:30:19 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fxowo-0002Jp-Ka for emacs-devel@gnu.org; Tue, 04 Jul 2006 13:44:30 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1Fxoj3-0003FG-Qe; Tue, 04 Jul 2006 13:30:17 -0400 Original-To: Alan Mackenzie In-reply-to: <20060704080222.GA1316@muc.de> (message from Alan Mackenzie on Tue, 4 Jul 2006 09:02:23 +0100) 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:56511 Archived-At: Richard, please tell me what's wrong with using eval-after-load. Here's the explanation from tips.texi. @item Redefining (or advising) an Emacs primitive is a bad idea. It may do the right thing for a particular program, but there is no telling what other programs might break as a result. In any case, it is a problem for debugging, because the two advised function doesn't do what its source code says it does. If the programmer investigating the problem is unaware that there is advice on the function, the experience can be very frustrating. We hope to remove all the places in Emacs that advise primitives. In the mean time, please don't add any more. @item It is likewise a bad idea for one Lisp package to advise a function in another Lisp package. @item Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for Loading}) in libraries and packages. This feature is meant for personal customizations; using it in a Lisp program is unclean because it modifies the behavior of another Lisp file in an invisible way. This is an obstacle for debugging, much like advising a function in the other package.