[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need help with ad-do-it, it loops
From: |
Lennart Borgman |
Subject: |
Re: Need help with ad-do-it, it loops |
Date: |
Fri, 8 May 2009 12:30:46 +0200 |
Thanks Klaus, yes, ad-return-value should already hold the value from
the original function at that point. I will replace it with just
ad-do-it
and see if it fixes the problem for Debian users.
On Fri, May 8, 2009 at 11:01 AM, <address@hidden> wrote:
> Just an assumption:
>
> I think that ad-do-it already sets the return argument (must be because
> otherwise advices which do jst ad-do-it would not work) and maybe your
> construction
>
> (setq ad-return-value ad-do-it)
>
> causes the loop...at least i never saw such a combination)
>
> Klaus
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: address@hidden [mailto:address@hidden Im Auftrag von Lennart Borgman
> Gesendet: Freitag, 8. Mai 2009 00:16
> An: Emacs-Devel devel
> Betreff: Need help with ad-do-it, it loops
>
> I have a strange case of looping in MuMaMo/nXhtml. One user (Rémi) has this
> problem on Debian. This happens after starting from "emacs -Q"
> and just loading nXhtml and pressing RET in the scratch buffer. The output
> from the debugger says
>
> Debugger entered--Lisp error: (error "Lisp nesting exceeds
> `max-lisp-eval-depth'")
> ad-Orig-syntax-ppss-flush-cache(192 192)
> apply(ad-Orig-syntax-ppss-flush-cache 192 192)
> ...
> ad-Orig-syntax-ppss-flush-cache(192 192)
> apply(ad-Orig-syntax-ppss-flush-cache 192 192)
> syntax-ppss-flush-cache(192 192)
> self-insert-command(1)
> newline(nil)
> call-interactively(newline nil nil)
>
>
>
> When Rémi set max-lisp-eval-depth to 100000 it loops a bit different:
>
> Debugger entered--Lisp error: (error "Variable binding depth exceeds
> max-specpdl-size")
> ad-Orig-syntax-ppss-flush-cache(270 270)
> apply(ad-Orig-syntax-ppss-flush-cache 270 270)
> ...
> ad-Orig-syntax-ppss-flush-cache(270 270)
> apply(ad-Orig-syntax-ppss-flush-cache 270 270)
> syntax-ppss-flush-cache(270 270)
> self-insert-command(1)
> newline(nil)
> call-interactively(newline nil nil)
>
>
>
> **** I have this defadvise in mumamo.el (in buffer *Scratch*
> mumamo-multi-major-mode is nil):
>
> (defadvice syntax-ppss-flush-cache (around
> mumamo-advice-syntax-ppss-flush-cache
> activate
> compile
> )
> "Support for mumamo.
> See the defadvice for `syntax-ppss' for an explanation."
> (if (not mumamo-multi-major-mode)
> ad-do-it
> (let ((pos (ad-get-arg 0)))
> (let* ((chunk-at-pos (when (and (boundp 'mumamo-multi-major-mode)
> mumamo-multi-major-mode)
> (mumamo-find-chunks pos
> "syntax-ppss-flush-cache"))))
> (if chunk-at-pos
> (let* ((syntax-ppss-last (overlay-get chunk-at-pos
> 'syntax-ppss-last))
> (syntax-ppss-cache (overlay-get chunk-at-pos
> 'syntax-ppss-cache)))
> (setq ad-return-value ad-do-it)
> (overlay-put chunk-at-pos 'syntax-ppss-last syntax-ppss-last)
> (overlay-put chunk-at-pos 'syntax-ppss-cache syntax-ppss-cache))
> (setq ad-return-value ad-do-it))))))
>
>
>
> I can't understand how this can loop. Any suggestions? Am I perhaps using
> ad-do-it incorrectly? The manual does not explicitly say it returns the value
> from the original function, but my understanding is that it does.
>
> (For more information see https://bugs.launchpad.net/nxhtml/+bug/369800)
>
>
>
- Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/07
- AW: Need help with ad-do-it, it loops, klaus.berndl, 2009/05/08
- Re: Need help with ad-do-it, it loops,
Lennart Borgman <=
- Re: Need help with ad-do-it, it loops, Stefan Monnier, 2009/05/08
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/08
- Re: Need help with ad-do-it, it loops, Stefan Monnier, 2009/05/08
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/08
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/08
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/09
- Re: Need help with ad-do-it, it loops, Sven Joachim, 2009/05/09
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/09
- Message not available
- Message not available
- Re: Need help with ad-do-it, it loops, Lennart Borgman, 2009/05/11
- Re: Need help with ad-do-it, it loops, Romain Francoise, 2009/05/11