unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation]
Date: Wed, 14 Dec 2005 17:46:46 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICKEEFDAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <yoiju0db9rdb.fsf@linus019.dd.chalmers.se>

    > So, the presence of `compile' in one defadvice turns on
    > byte-compilation for subsequent defadvices - IOW, it's modal? I
    > don't see that explained anywhere.

    What part of "`maybe' will compile if the byte-compiler is already
    loaded" don't you understand?

Got it. Thanks again. It all comes back to `ad-default-compilation-action' -
the "explanation" of the defadvice `compile' flag behavior is the
description of option `ad-default-compilation-action' (3 long pages later,
with no forward xref to it). A few simple turns around Robinson's barn, and
we have it!

I think the doc string and the Info description of `defadvice' should
explicitly mention that the behavior of the `compile' FLAG value is
overridden by the value of `ad-default-compilation-action'. The current text
gives the impression that for a `defadvice' to be compiled you need both
defadvice flags present: `activate' and `compile'. And it gives the
impression that if both are present then the defadvice will be compiled.
Neither impression is necessarily correct, in fact - it all depends on
`ad-default-compilation-action'.

Also, given 1) this overriding behavior, 2) the default value of `maybe' for
`ad-default-compilation-action', and 3) the fact that a single `compile'
flag will turn on compilation modally, I don't see much sense in having that
flag.  __What is the use case for it?__

If the value of `ad-default-compilation-action' is `always', `never', or
`like-original' then the defadvice `compile' flag presumably does nothing
(it's presence or absence is irrelevant). If the option value is `maybe',
then the first occurrence of the `compile' flag in a defadvice turns
compilation on forever (until you change `ad-default-compilation-action').

That is, it would seem that the only time defadvice's `compile' has any
effect at all is for the first occurrence of the flag in some defadvice, and
then only if 1) flag `activate' is also present and 2)
`ad-default-compilation-action' is `maybe'. Is that right? Not much of a
raison d'etre.

I haven't tried the numerous possible combinations. I'm just trying to
understand the behavior from the descriptions. Summary: To me, the doc for
the defadvice `compile' flag conflicts with the doc for option
`ad-default-compilation-action', and it appears that the latter is what's
correct. And I don't really see why the `compile' flag exists.

I'm probably missing something here, as I was before by being ignorant of
`ad-default-compilation-action'. Let me know.

  reply	other threads:[~2005-12-15  1:46 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@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 17:17                             ` [drew.adams@oracle.com: 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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICKEEFDAAA.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).