From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13305: 24.2; describe-function gives incorrect function location information (for functions changed in a hook?) Date: Thu, 03 Jan 2013 12:22:34 -0500 Message-ID: References: <87d2xovgsh.fsf@foil.strangled.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357233783 415 80.91.229.3 (3 Jan 2013 17:23:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2013 17:23:03 +0000 (UTC) Cc: 13305@debbugs.gnu.org To: Mark Lillibridge Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 03 18:23:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1TqoVj-0000tk-NH for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2013 18:23:19 +0100 Original-Received: from localhost ([::1]:56231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoVU-0000xo-HQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2013 12:23:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoVR-0000qs-Gj for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 12:23:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqoVQ-00066d-Il for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 12:23:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqoVQ-00066X-FP for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 12:23:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TqoVS-000874-Cu for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 12:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Jan 2013 17:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 13305-submit@debbugs.gnu.org id=B13305.135723376131153 (code B ref 13305); Thu, 03 Jan 2013 17:23:02 +0000 Original-Received: (at 13305) by debbugs.gnu.org; 3 Jan 2013 17:22:41 +0000 Original-Received: from localhost ([127.0.0.1]:41830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqoV7-00086Q-Fh for submit@debbugs.gnu.org; Thu, 03 Jan 2013 12:22:41 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:7193) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TqoV5-00086J-QI for 13305@debbugs.gnu.org; Thu, 03 Jan 2013 12:22:40 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09FxK5W/2dsb2JhbABEDoFtshaBCIIVAQEEAVYjBQsLDiYHCxQYDSSIHAW6CZBEA4hCmnGBWIIwV4E4Gg X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="211283526" Original-Received: from 69-196-174-86.dsl.teksavvy.com (HELO pastel.home) ([69.196.174.86]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Jan 2013 12:22:36 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3247158FAD; Thu, 3 Jan 2013 12:22:35 -0500 (EST) In-Reply-To: <87d2xovgsh.fsf@foil.strangled.net> (Mark Lillibridge's message of "Tue, 01 Jan 2013 11:34:22 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69336 Archived-At: > For some reason I was thinking that changes to interactive didn't > work properly with advice. Just using defun can be more convenient than > advice, however, when you are in a hurry for a temporary patch. Fine, but don't expect everything else to handle it just right. > It's too bad there isn't a macro for replace-defun that acts > syntactically identical to defun except that it uses advice to patch > lazily the built-in (e.g., part of Emacs distribution) function. Instead of (replace-defun foo (ARGS) BODY), you can write (advice-add foo :around (lambda (_ignore ARGS) BODY)) If needed we could add a :replace to advice-add, so it'd be (advice-add foo :replace (lambda (ARGS) BODY)), but I'm not convinced it's worth the trouble. Stefan