From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19033: 25.0.50; (elisp) `Advising Named Functions' does not describe FUNCTION Date: Wed, 09 Oct 2019 03:46:14 +0200 Message-ID: <87y2xuwv15.fsf@gnus.org> References: <97aa8252-de9e-4a3d-9a79-4d080bc17aaa@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168120"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 19033@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 03:47:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iI14Z-000hdp-0w for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 03:47:27 +0200 Original-Received: from localhost ([::1]:38638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iI14V-0006zs-QJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2019 21:47:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42163) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iI14B-0006zS-8s for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 21:47:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iI14A-00078h-2P for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 21:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iI149-00078T-VA for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 21:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iI149-0003p0-Qv for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2019 21:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2019 01:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19033 X-GNU-PR-Package: emacs Original-Received: via spool by 19033-submit@debbugs.gnu.org id=B19033.157058558114630 (code B ref 19033); Wed, 09 Oct 2019 01:47:01 +0000 Original-Received: (at 19033) by debbugs.gnu.org; 9 Oct 2019 01:46:21 +0000 Original-Received: from localhost ([127.0.0.1]:51714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI13U-0003ns-IU for submit@debbugs.gnu.org; Tue, 08 Oct 2019 21:46:20 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:50166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iI13S-0003nk-P5 for 19033@debbugs.gnu.org; Tue, 08 Oct 2019 21:46:19 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iI13O-0000xA-GW; Wed, 09 Oct 2019 03:46:16 +0200 In-Reply-To: <97aa8252-de9e-4a3d-9a79-4d080bc17aaa@default> (Drew Adams's message of "Wed, 12 Nov 2014 09:11:47 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:168690 Archived-At: Drew Adams writes: > This node sends you off to node `Core Advising Primitives' for > information about parameters WHERE and PROPS. > > That's bad enough, since `Advising Named Functions' is intended as the > MAIN entry point for advising functions: > > "But you should use `advice-add' and `advice-remove' for that instead." > > But `Advising Named Functions' tells you nothing about FUNCTION. In > particular, it does not tell you what its signature must be or must fit. > > Worse still, neither does node `Core Advising Primitives' tell you > anything about the signature of FUNCTION! So it would not even be > enough to send readers to that node for information about FUNCTION, > as we do now for WHERE and PROPS. > > What must FUNCTION accept as argument(s)? What must it return? > If there are no restrictions on its signature, then say so. If I understand correctly, what you want is that the @defmac add-function where place function &optional props in @node Core Advising Primitives should describe what parameters @var{function} takes in that macro. That is indeed not described in that node, presumably because it's complicated. Instead, we're directed to @var{where} determines how @var{function} is composed with the existing function, e.g., whether @var{function} should be called before, or after the original function. @xref{Advice Combinators}, for the list of available ways to compose the two functions. where we find stuff like @table @code @item :before Call @var{function} before the old function. Both functions receive the same arguments I think that makes sense -- trying to say anything about the parameters before talking about @var{where} is pretty futile, because @var{where} decides what parameters the function will receive. So I don't see anything to fix here, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no