X-Loop: bug-gnu-emacs@HIDDEN Subject: bug#5301: 23.1; unload-feature remove defadvice Reply-To: Kevin Ryde <user42@HIDDEN>, 5301 <at> debbugs.gnu.org Mail-Followup-To: Kevin Ryde <user42@HIDDEN>, 5301 <at> debbugs.gnu.org Resent-From: Kevin Ryde <user42@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sun, 03 Jan 2010 23:29:01 +0000 Resent-Message-ID: <handler.5301.B.126256130311408 <at> debbugs.gnu.org> Resent-Sender: bug-gnu-emacs@HIDDEN X-Emacs-PR-Message: report 5301 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit <at> debbugs.gnu.org id=B.126256130311408 (code B ref -1); Sun, 03 Jan 2010 23:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2010 23:28:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NRZry-0002xx-Kf for submit <at> debbugs.gnu.org; Sun, 03 Jan 2010 18:28:22 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <gg@HIDDEN>) id 1NRZrw-0002xs-Kc for submit <at> debbugs.gnu.org; Sun, 03 Jan 2010 18:28:21 -0500 Received: from mail.gnu.org ([199.232.76.166]:40564 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from <gg@HIDDEN>) id 1NRZrs-0003Kz-Py for submit <at> debbugs.gnu.org; Sun, 03 Jan 2010 18:28:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from <gg@HIDDEN>) id 1NRZro-000728-Ei for submit <at> debbugs.gnu.org; Sun, 03 Jan 2010 18:28:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:37234) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from <gg@HIDDEN>) id 1NRZro-000724-8r for submit <at> debbugs.gnu.org; Sun, 03 Jan 2010 18:28:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRZro-00032C-0j for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2010 18:28:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRZrj-0002zv-AO for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2010 18:28:11 -0500 Received: from [199.232.76.173] (port=56802 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRZrj-0002zs-6J for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2010 18:28:07 -0500 Received: from mailout1-6.pacific.net.au ([61.8.2.213]:40665 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from <gg@HIDDEN>) id 1NRZri-0006za-4U for bug-gnu-emacs@HIDDEN; Sun, 03 Jan 2010 18:28:06 -0500 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id C969F507FD1 for <bug-gnu-emacs@HIDDEN>; Mon, 4 Jan 2010 10:28:01 +1100 (EST) Received: from blah.blah (ppp2EA9.dyn.pacific.net.au [61.8.46.169]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 0AA1827430 for <bug-gnu-emacs@HIDDEN>; Mon, 4 Jan 2010 10:28:01 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from <gg@HIDDEN>) id 1NRZrX-0004xH-Ct for bug-gnu-emacs@HIDDEN; Mon, 04 Jan 2010 10:27:55 +1100 From: Kevin Ryde <user42@HIDDEN> To: bug-gnu-emacs@HIDDEN Date: Mon, 04 Jan 2010 10:27:54 +1100 Message-ID: <877hry7oqt.fsf@HIDDEN> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.4 (-----) As an idea, it'd be good if defadvice were among the `def' things automatically unloaded by `unload-feature'. A defadvice will nearly always use functions or whatever in the defining package and if they've been unloaded it could leave the advised target function badly broken. I know it's possible for a foo-unload-function to undo its defadvices. I've done that for some of my things, but it gets very repetitive and makes me think defadvice could set that up itself. I know advice is a slightly second class citizen, but if the necessary unloading stuff were confined to advice.el then it needn't be a burden if no advise is in use. My best idea so far would be for defadvice to record something in load-history like (defadvice . (TARGET CLASS AD-NAME)) if it could beg a tie-in to unload-feature at a good spot. Something indirect like a property setting on the `defadvice' symbol appearing in the load-history might let other `def' macros jig up unloading for themselves in a general way. ;; untested! (put 'defadvice 'load-history-unload-feature-function (lambda (elem) (when (apply 'ad-find-advice (cdr elem)) (apply 'ad-remove-advice (cdr elem)) (ad-activate (cadr elem))))) May have to think about what happens if the package defining the `def' macro is unloaded when things it has `def'fed still exist. But if `require's express dependencies correctly that might never arise. In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) Content-Type: text/plain; charset=utf-8 X-Loop: bug-gnu-emacs@HIDDEN From: bug-gnu-emacs@HIDDEN (Emacs bug Tracking System) To: Kevin Ryde <user42@HIDDEN> Subject: bug#5301: Acknowledgement (23.1; unload-feature remove defadvice) Message-ID: <handler.5301.B.126256130311408.ack <at> debbugs.gnu.org> References: <877hry7oqt.fsf@HIDDEN> X-Emacs-PR-Message: ack 5301 X-Emacs-PR-Package: emacs Reply-To: 5301 <at> debbugs.gnu.org Date: Sun, 03 Jan 2010 23:29:01 +0000 Thank you for filing a new bug report with Emacs. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 5301 <at> debbugs.gnu.org. Please do not send mail to bug-gnu-emacs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 5301: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5301 Emacs Bug Tracking System Contact bug-gnu-emacs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 17 Jan 2010 00:59:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 16 19:59:11 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1NWJTy-0007bh-Pc for submit <at> debbugs.gnu.org; Sat, 16 Jan 2010 19:59:10 -0500 Received: from mail-bw0-f216.google.com ([209.85.218.216]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <lekktu@HIDDEN>) id 1NWJTw-0007bc-MF for control <at> debbugs.gnu.org; Sat, 16 Jan 2010 19:59:09 -0500 Received: by bwz8 with SMTP id 8so1226931bwz.39 for <control <at> debbugs.gnu.org>; Sat, 16 Jan 2010 16:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=GYHzJNYQnjx2M0WpVgTKMzMzJ0s1ZcFvL7TQIcbhjP8=; b=QZBlrBoch6moZg0M5pFhglsfN3FG4X9H+SESuf7eqqK30tJIVaFdZWcYiAb6gUGTGV 7zJieGyw41dbepsqZxq/zMYTpU89k00R4g7WNdeSW5zt1Dgy6gXdpRkXsm1BLQW5PIqN QY/CuCo0hohNWlbd0XDj5MrraWRfkMin5USfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=r0jhpL3UM01gsNrKySem9VTaHgzAKkBy9dxq0stAxYDTaNdASFitwVipXkAy/Evy8L mJ/A1cz3pwUfAaj1jsTUghlGq4DXKAzBKviBzRhwaPGA1loVtRV4xHU4BEW1Luj0Oc11 MK8CGpvsrh5lwyyuEiJtgFKtfV6aFeBIxbcxs= MIME-Version: 1.0 Received: by 10.204.156.195 with SMTP id y3mr2274285bkw.46.1263689943263; Sat, 16 Jan 2010 16:59:03 -0800 (PST) From: Juanma Barranquero <lekktu@HIDDEN> Date: Sun, 17 Jan 2010 01:58:43 +0100 Message-ID: <f7ccd24b1001161658k40b04d12r6b9e639860fe0b6b@HIDDEN> Subject: To: control <at> debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) reassign 5400 emacs,ada-mode severity 5301 wishlist quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.