unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5863: defadvice in byte compiled file does not work
@ 2010-04-08 15:26 Lennart Borgman
  2010-04-08 15:50 ` Andreas Schwab
  0 siblings, 1 reply; 20+ messages in thread
From: Lennart Borgman @ 2010-04-08 15:26 UTC (permalink / raw)
  To: 5863

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)?







^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-11-27 11:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 15:26 bug#5863: defadvice in byte compiled file does not work Lennart Borgman
2010-04-08 15:50 ` Andreas Schwab
2010-04-08 15:57   ` Lennart Borgman
2010-04-08 16:06     ` Andreas Schwab
2010-04-08 16:22       ` Lennart Borgman
2010-04-08 16:55         ` Andreas Schwab
2010-04-08 16:56           ` Lennart Borgman
2010-04-08 17:04             ` Andreas Schwab
2010-04-08 17:06               ` Lennart Borgman
2010-04-08 18:22                 ` Lennart Borgman
2010-04-08 21:52                 ` Andreas Schwab
2010-04-08 23:13                   ` Lennart Borgman
2010-04-09  0:19                     ` Lennart Borgman
2010-04-09  2:06             ` Stefan Monnier
2010-04-09  3:37               ` Drew Adams
2020-11-19  3:23               ` Stefan Kangas
2020-11-19  5:20                 ` Stefan Monnier
2020-11-19  8:14                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-20  5:07                     ` Stefan Kangas
2020-11-27 11:45                       ` Stefan Kangas

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).