From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Need help with ad-do-it, it loops Date: Fri, 8 May 2009 00:15:59 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1241734580 25058 80.91.229.12 (7 May 2009 22:16:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2009 22:16:20 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 08 00:16:12 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M2Bsx-000868-JY for ged-emacs-devel@m.gmane.org; Fri, 08 May 2009 00:16:12 +0200 Original-Received: from localhost ([127.0.0.1]:56686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M2Bsw-0005eF-Ez for ged-emacs-devel@m.gmane.org; Thu, 07 May 2009 18:16:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M2Bsr-0005d7-DB for emacs-devel@gnu.org; Thu, 07 May 2009 18:16:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M2Bso-0005c8-2k for emacs-devel@gnu.org; Thu, 07 May 2009 18:16:05 -0400 Original-Received: from [199.232.76.173] (port=60301 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M2Bsn-0005bv-Nw for emacs-devel@gnu.org; Thu, 07 May 2009 18:16:01 -0400 Original-Received: from mail-bw0-f161.google.com ([209.85.218.161]:40506) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M2Bsn-0007wV-Cr for emacs-devel@gnu.org; Thu, 07 May 2009 18:16:01 -0400 Original-Received: by bwz5 with SMTP id 5so1090481bwz.42 for ; Thu, 07 May 2009 15:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7HOZ7UVAAlFa23QKZ+i4lFhK5q9izLS3JsFh0wLJ8FI=; b=nb3Xw+rjBI7RVplDv9arJcpnQ6bz9cPdhJmQFxgI3nmKUit1ZhkIr8KKNo2NPE+wxk lNX6lDOP5140ZJyIEtn4xhDafh1PorM8RQfohs8MXGNnZo1EzQUaJfTgerKEduNDG5Jm tC4NfsUM1ccVwsDlRiERNaUifgTAKB0c+cJcI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=GR1IbfaBx3khTmxY1+hhnjBYECFliWitbeENNqTaT8DX9AFh9Gs8tl1DyV+5rZfcqL gEZPRs8SK144oawrRSww1ErkYb5wsrlxTXg38WCi8iKFfbJUAoKkW6N91hYhYfxnW53Q I9b5TFClCMUMdz5Pptb1Bxs67RdWWBpDqofTE= Original-Received: by 10.223.110.4 with SMTP id l4mr1892766fap.47.1241734559008; Thu, 07 May 2009 15:15:59 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110762 Archived-At: I have a strange case of looping in MuMaMo/nXhtml. One user (R=C3=A9mi) 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=C3=A9mi 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-cach= e)) (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)