From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.devel Subject: Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500) Date: Wed, 14 Nov 2012 08:18:29 +0900 Organization: Emacsen advocacy group Message-ID: References: <87haoyl4on.fsf@topper.koldfront.dk> <87625bw1jx.fsf@visionobjects.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1352848725 3641 80.91.229.3 (13 Nov 2012 23:18:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2012 23:18:45 +0000 (UTC) Cc: asjo@koldfront.dk, ivan.kanis@googlemail.com, emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 14 00:18:54 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TYPkq-0005Dm-V1 for ged-emacs-devel@m.gmane.org; Wed, 14 Nov 2012 00:18:53 +0100 Original-Received: from localhost ([::1]:37409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYPkh-0004m1-7h for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2012 18:18:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYPkd-0004l2-HQ for emacs-devel@gnu.org; Tue, 13 Nov 2012 18:18:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYPka-0006em-FA for emacs-devel@gnu.org; Tue, 13 Nov 2012 18:18:39 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]:52232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYPka-0006ei-Aq for emacs-devel@gnu.org; Tue, 13 Nov 2012 18:18:36 -0500 Original-Received: from localhost ([127.0.0.1]:42662) by orlando.hostforweb.net with smtp (Exim 4.77) (envelope-from ) id 1TYPkY-0001Mm-3d; Tue, 13 Nov 2012 17:18:34 -0600 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130006 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.6) Emacs/24.3.50 (i686-pc-cygwin) Cancel-Lock: sha1:to2ktCk3j+xVTzt1TX1cg+NeP5Y= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (barebone) [generic] X-Received-From: 216.246.45.90 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154857 Archived-At: Stefan Monnier wrote: > You might try your advice code with the new code in trunk. > There are significant changes in there, so I suspect the bug you suffered > from is gone, but I wouldn't be surprised if it is replaced by others. I built Emacs from scratch using the very fresh bzr source. It looks to have been pretty improved except for at least one problem: an elc module seems to need to be loaded before advising a function that provides, i.e.: This works: (require 'gnus-art) (defadvice gnus-article-bla-bla...) This doesn't work: (defadvice gnus-article-bla-bla...) In the latter case I got the following error: Debugger entered--Lisp error: (wrong-type-argument listp t) ad-parse-arglist(t) ad-map-arglists(t t) ad-make-advised-definition(gnus-article-prepare-display) ad-activate-advised-definition(gnus-article-prepare-display nil) ad-activate(gnus-article-prepare-display nil) (progn (ad-add-advice (quote gnus-article-prepare-display)... It's easy for you to fix this, isn't it? :) The advice that causes this is: (defadvice gnus-article-prepare-display (after delete-last-empty-lines activate) "Delete last empty lines." (let ((limit (previous-char-property-change (goto-char (point-max))))) (while (progn (forward-line -1) (and (< limit (point)) (looking-at "[\t ]*$"))))) (forward-line 1) (let ((inhibit-read-only t)) (delete-region (point) (point-max))))