[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lisp/emacs-lisp/debug.el patch.

From: David Kastrup
Subject: Re: lisp/emacs-lisp/debug.el patch.
Date: Wed, 23 Mar 2005 14:14:55 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lute Kamstra <address@hidden> writes:

> Here's a patch to handle debug-on-entry for autoloaded functions and
> compiled macros.  
> The patch also solves a problem with cancel-debug-on-entry.
> Currently, it signals an error for built-in functions, autoloaded
> functions, and aliases that are not set to debug-on entry.  The patch
> makes cancel-debug-on-entry a no-op in these cases.
> Ok to commit?

On a (maybe?) completely different track: since AUCTeX and
preview-latex are up to now distributed separately (and there will be
a separate preview-latex available for a while to come, to use with
older AUCTeX versions as well), preview-latex uses defadvice on AUCTeX

The advice was originally given with

2 matches for "defadvice" in buffer: preview.el
   2007:(defadvice TeX-region-create (around preview-counters preactivate)
   3151:(defadvice TeX-region-create (before preview-preamble preactivate)

It turned out, however, that in certain autoload constellations (where
stuff got loaded in order dictated by a combination of mode-hooks and
requires and autoloads) the activation of the advice did not happen.
It was possible to explicitly activate it manually, however.
Possibly relevant dependency scraps would be

-*- mode: grep; default-directory: "/home/tmp/auctex/preview/" -*-
grep -nH -e TeX-region-create /home/tmp/auctex/*.el
/home/tmp/auctex/tex-buf.el:176:    (TeX-region-create (TeX-region-file 
/home/tmp/auctex/tex-buf.el:1123:(defun TeX-region-create (file region original 
/home/tmp/auctex/tex.el:580:(autoload 'TeX-region-create "tex-buf" no-doc nil)

Grep finished (matches found) at Wed Mar 23 14:04:09

Looking at the dependencies, it would appear that the autoload for
TeX-region-create itself was unnecessary.

We have now changed this to

2 matches for "defadvice" in buffer: preview.el
   2007:(defadvice TeX-region-create (around preview-counters)
   3151:(defadvice TeX-region-create (before preview-preamble preactivate 

Both tex.el and tex-buf.el are required (in that order) upon both
compilation and execution of preview.el, but it is conceivable that
with some use the load order might be different.

Another issue is that byte compiler warnings seemed to indicate that
preactivation does not work: the advice still gets compiled at load

It is probably some interaction with autoload forms here that comes
into play.  They current workaround at least works, but it would
probably be prudent to figure why preacticivation seems to fail in
some settings involving autoload.

Does any of that ring a bell with anybody?

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]