From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation]
Date: Tue, 13 Dec 2005 19:45:27 -0800 [thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICOEDEDAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICKEDEDAAA.drew.adams@oracle.com>
Sorry - sending again as plain text. My mail client sends formatted text
whenever I reply to a Unicode message.
------
> And I wonder about the behavior of the on-the-fly defadvice
> byte-compiling. Again, I'm no doubt confused about that - I'd like
> to understand what's happening there and why.
See `ad-default-compilation-action'.
Thanks very much. I never heard of that variable. Or, I may
have read about it, but never paid adequate attention. Here is
its doc string:
Defines whether to compile advised definitions during activation.
A value of `always' will result in unconditional compilation,
`never' will always avoid compilation, `maybe' will compile if the
byte-compiler is already loaded, and `like-original' will compile
if the original definition of the advised function is compiled or
a built-in function. Every other value will be interpreted as
`maybe'. This variable will only be considered if the
COMPILE argument of `ad-activate' was supplied as nil.
The default value is `maybe', and that's the value I had. The
doc string says that that means that activation will also
compile - if the byte-compiler is already loaded. I have no
idea what loads the byte compiler, or why its being loaded
would be the criterion applied here, but I must assume that in
my case it was already loaded, and that that is the default
situation (?). How to tell if it is loaded?
The doc string also says that this only happens if the COMPILE
arg to ad-activate is nil. Well, I never explicitly called
ad-activate, with or without a COMPILE arg - I used only
defadvice. But I guess the `compile' FLAG for defadvice acts
like the COMPILE arg to ad-activate in this regard (not
mentioned in the doc string). Is that correct?
Does this all seem a bit convoluted to anyone besides me? Does
anyone else think that, at the very least, the doc string of
defadvice should clarify that the meaning of not using the
`compile' flag can be overridden by the value of
`ad-default-compilation-action' - depending on that variable's
value, and that it will be overridden by the default value
(`maybe') in the default configuration (byte-compiler loaded)?
What goes for the doc string of defadvice also goes for the
description in Info (Elisp).
Apparently, the already elaborate description of defadvice in
Info (node "Defining Advice") is far from being enough for
someone to understand how to use defadvice in even a simple case.
next prev parent reply other threads:[~2005-12-14 3:45 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 2:36 [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard Stallman
2005-12-07 18:55 ` Chong Yidong
2005-12-08 4:53 ` Richard M. Stallman
2005-12-08 16:14 ` Drew Adams
2005-12-09 13:17 ` Eli Zaretskii
2005-12-09 14:07 ` Chong Yidong
2005-12-09 18:37 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-10 4:14 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-11 18:17 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12 5:23 ` Richard M. Stallman
2005-12-12 5:40 ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-13 3:14 ` Richard M. Stallman
2005-12-13 3:52 ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-13 23:33 ` Richard M. Stallman
2005-12-14 1:05 ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 1:24 ` Johan Bockgård
2005-12-14 3:41 ` [drew.adams@oracle.com: Drew Adams
2005-12-14 3:45 ` Drew Adams [this message]
2005-12-14 17:17 ` Johan Bockgård
2005-12-14 21:29 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 23:43 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Johan Bockgård
2005-12-15 1:46 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-11 20:21 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Eli Zaretskii
2005-12-11 21:35 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12 5:52 ` Eli Zaretskii
2005-12-12 6:11 ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-12 6:44 ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-12 21:22 ` Eli Zaretskii
2005-12-12 21:53 ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-13 4:30 ` Eli Zaretskii
2005-12-13 4:59 ` [drew.adams@oracle.com: Drew Adams
2005-12-12 5:23 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-12 6:11 ` Eli Zaretskii
2005-12-13 3:14 ` Richard M. Stallman
2005-12-13 4:39 ` Eli Zaretskii
2005-12-13 23:33 ` Richard M. Stallman
2005-12-14 19:38 ` Eli Zaretskii
2005-12-15 2:09 ` Richard M. Stallman
2005-12-15 4:46 ` Eli Zaretskii
2005-12-16 1:51 ` Richard M. Stallman
2005-12-16 19:48 ` Eli Zaretskii
2005-12-16 20:14 ` Eli Zaretskii
2005-12-17 1:05 ` Richard M. Stallman
2005-12-17 8:29 ` Eli Zaretskii
2005-12-17 23:59 ` Richard M. Stallman
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=DNEMKBNJBGPAOPIJOOICOEDEDAAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
/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.