From: Drew Adams <drew.adams@oracle.com>
To: 17571@debbugs.gnu.org
Subject: bug#17571: 24.4.50; doc string of `advice-function-mapc' etc.
Date: Fri, 23 May 2014 16:38:15 -0700 (PDT) [thread overview]
Message-ID: <97f7e8b0-09d0-4c04-a010-40696de16a97@default> (raw)
Not the only doc string in nadvice.el that needs help. HTH.
Apply F to every advice function in FUNCTION-DEF.
F is called with two arguments: the function that was added, and the
properties alist that was specified when it was added.
Could you please spend a few more words to try to help users understand
what this function does and what its parameters are/do? Maybe this
could use a cross-reference to another doc string, to make things
clearer?
We can deduce from the verb "apply" that F must be a function. OK, but
the Emacs convention is to give such a parameter a name like FUNCTION,
to make this clear (and to simplify the doc, BTW). Why not do that?
FUNCTION-DEF is undefined. All we know is that it somehow has "advice
functions" "in" it. What an "advice function" is and what forms it can
take are not described here. What "in" it means is unknown too. (Is it
a list of functions perhaps)? And why "-DEF", which usually stands for
"definition", "define", or "default" - what does it mean here?
F is called with two args. The first is the "function that was added".
Huh? What function is that? Added to what? When/how/where/why was it
added?
The second arg to F is "the properties alist that was specified when it
was added". Huh? Down one rabbit hole and into another.
All this doc string does for us is replace 3 unknowns: 2 parameters and
the function behavior, with many more unknowns and a headache.
What about the `mapc' in the function name? Does that help? Can you
perhaps describe the function in a way that relates to existing function
`mapc' - would that be helpful? (If not, why bother to use `mapc' in
the name?)
The doc for other functions in nadvice.el is similarly confusing and
less helpful than it should be, when it is not missing altogether.
This library has apparently been around for 3 years now, and it has the
pretension of replacing the Emacs advice feature (`defadvice'). No
doubt it has something to offer in terms of functionality and ideas.
But at least docwise it doesn't seem ready for primetime yet.
In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
of 2014-05-17 on ODIEONE
Bzr revision: 117119 eggert@cs.ucla.edu-20140517081131-ugu7ociaoec2xk7y
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
next reply other threads:[~2014-05-23 23:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 23:38 Drew Adams [this message]
2019-08-14 23:43 ` bug#17571: 24.4.50; doc string of `advice-function-mapc' etc Lars Ingebrigtsen
2019-08-15 0:40 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97f7e8b0-09d0-4c04-a010-40696de16a97@default \
--to=drew.adams@oracle.com \
--cc=17571@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.