unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: lisp/emacs-lisp/debug.el patch.
Date: Wed, 23 Mar 2005 14:14:55 +0100	[thread overview]
Message-ID: <x5ll8eld0w.fsf@lola.goethe.zz> (raw)
In-Reply-To: <874qf2bkqg.fsf@xs4all.nl> (Lute Kamstra's message of "Wed, 23 Mar 2005 13:38:31 +0100")

Lute Kamstra <Lute.Kamstra.lists@xs4all.nl> 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
functions.

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 TeX-default-extension)
/home/tmp/auctex/tex-buf.el:1123:(defun TeX-region-create (file region original offset)
/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 activate)

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

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	other threads:[~2005-03-23 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 12:38 lisp/emacs-lisp/debug.el patch Lute Kamstra
2005-03-23 13:14 ` David Kastrup [this message]

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=x5ll8eld0w.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).