From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Date: Wed, 14 Dec 2005 17:46:46 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134611281 26970 80.91.229.2 (15 Dec 2005 01:48:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 01:48:01 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 15 02:47:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmiD5-0008FL-Dc for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 02:47:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmiDh-0005Ys-K7 for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2005 20:47:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmiDV-0005XZ-0r for emacs-devel@gnu.org; Wed, 14 Dec 2005 20:47:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmiDS-0005We-Gs for emacs-devel@gnu.org; Wed, 14 Dec 2005 20:47:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmiDS-0005WU-DH for emacs-devel@gnu.org; Wed, 14 Dec 2005 20:47:30 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EmiFc-0006Mx-HJ for emacs-devel@gnu.org; Wed, 14 Dec 2005 20:49:44 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBF25BjS030029 for ; Wed, 14 Dec 2005 20:05:11 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBF1kmPF024039 for ; Wed, 14 Dec 2005 18:46:48 -0700 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-82-104.vpn.oracle.com [141.144.82.104]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jBF1kl0E024014 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 14 Dec 2005 18:46:48 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47757 Archived-At: > 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.