From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#5863: defadvice in byte compiled file does not work Date: Thu, 8 Apr 2010 17:26:26 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1270740530 4045 80.91.229.12 (8 Apr 2010 15:28:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Apr 2010 15:28:50 +0000 (UTC) To: 5863@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 08 17:28:45 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzteu-0002DS-I9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 17:28:44 +0200 Original-Received: from localhost ([127.0.0.1]:51419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nztet-0002CM-W9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 11:28:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nztep-0002C9-8n for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:28:39 -0400 Original-Received: from [140.186.70.92] (port=54349 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzteo-0002Bn-1l for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:28:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nztem-0008RB-Ls for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:28:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34941) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nztem-0008R0-KB for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:28:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NztdG-0004de-AP; Thu, 08 Apr 2010 11:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Apr 2010 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 5863 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Emacs Bugs Original-Received: via spool by submit@debbugs.gnu.org id=B.127074042017821 (code B ref -1); Thu, 08 Apr 2010 15:27:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Apr 2010 15:27:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NztdE-0004dO-Lq for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:27:00 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NztdD-0004dI-8L for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:26:59 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:37444) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nztd8-000890-B3 for submit@debbugs.gnu.org; Thu, 08 Apr 2010 11:26:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nztd7-0001R4-Jw for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:53 -0400 Original-Received: from [140.186.70.92] (port=54013 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nztd5-0001PU-GT for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nztd4-0008BF-04 for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:51 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.157]:26798) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nztd3-0008Ah-Nr for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 11:26:49 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so1800878fga.12 for ; Thu, 08 Apr 2010 08:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:received :message-id:subject:to:content-type; bh=vkGK3U/TgLoeHTKwH9BUm02PSYVo9zDE1XWOQkHSNek=; b=JdYpTUWHbLdo8zmXAWSIvdmxtmKHlu6h7Rwug8GwzIFg8tpd1Alv//GqCcC3pxto7F nntWUsWZUzk3dU8WQYbNPiVtJSeIO7XAi5kU65dbgiCAH+PQnpZY/0aps5SraveDVx4L AvBS//eM62cWdaIwL7X9ZFk+njar1i4gtvLhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=l3/YKZdTrsf7xfXQ9T//YAt9RD/XKI/ZLgB0Koh/YJidf3S+Y0VLFLqs0QFA2F18rc ABB1QHEzxRV0sn+w/Bo6SWhJAoJsmk+STTM76g3HVI1lmu8dAA3XoLSJvr2yfsYEjB7j gL1EWAWb19wvrbrF9E9Wp/9QmmDMMBWzudYQ8= Original-Received: by 10.239.169.18 with HTTP; Thu, 8 Apr 2010 08:26:26 -0700 (PDT) Original-Received: by 10.239.186.79 with SMTP id f15mr29560hbh.103.1270740406789; Thu, 08 Apr 2010 08:26:46 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 08 Apr 2010 11:27:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36050 Archived-At: I have this in mumamo.el: (defvar mumamo-stop-widen nil) (defadvice widen (around mumamo-ad-widen activate compile) (unless (and mumamo-multi-major-mode mumamo-stop-widen) ad-do-it)) I let bind mumamo-stop-widen to avoid widening for certain situations. This works sometimes and not other times. It looks like the defadvice is simply skipped the other times (but I am not sure). It looks like it depends on byte compilation in some way. Or actually several ways. I have seen instances where it helps to eval the defadvice and other cases where it does not. If the function calling (widen) is byte compiled it does not work, but it works if the function is evaled. However it looks like both these conditions must be meat. Beeing able to do something like this is very essential to get multi major modes working reliably. Is there any remedy for this problem? If not, could we please add a way to control if (widen) widens the buffer (or how it does it, but that seems to complicated to me)?