From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: AW: Need help with ad-do-it, it loops Date: Fri, 8 May 2009 11:01:42 +0200 Message-ID: <84D8FEFE8D23E94E9C2A6F0C58EE07E302593647@mucmail3.sdm.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1241776558 19373 80.91.229.12 (8 May 2009 09:55:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 May 2009 09:55:58 +0000 (UTC) To: , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 08 11:55:50 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 1M2Mo1-0006v2-Me for ged-emacs-devel@m.gmane.org; Fri, 08 May 2009 11:55:50 +0200 Original-Received: from localhost ([127.0.0.1]:40020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M2Mo0-0004i1-NJ for ged-emacs-devel@m.gmane.org; Fri, 08 May 2009 05:55:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M2Lxq-0007rW-Aa for emacs-devel@gnu.org; Fri, 08 May 2009 05:01:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M2Lxl-0007oa-96 for emacs-devel@gnu.org; Fri, 08 May 2009 05:01:53 -0400 Original-Received: from [199.232.76.173] (port=46570 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M2Lxl-0007oS-4P for emacs-devel@gnu.org; Fri, 08 May 2009 05:01:49 -0400 Original-Received: from world2.sdm.de ([192.76.162.230]:48141) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M2Lxk-0008H1-B4 for emacs-devel@gnu.org; Fri, 08 May 2009 05:01:48 -0400 Original-Received: from mucns1 ([10.40.232.18] helo=mucns1.sdm.de) by world2.sdm.de with esmtp (MTA) id 1M2Lxf-0004H7-Hd; Fri, 08 May 2009 11:01:43 +0200 Original-Received: from sdmmail1.sdm.de ([10.40.232.6]) by mucns1.sdm.de with esmtp (MTA) id 1M2Lxf-0007v2-Dn; Fri, 08 May 2009 11:01:43 +0200 Original-Received: from mucmail3.sdm.de ([10.40.232.45]) by sdmmail1.sdm.de with Microsoft SMTPSVC(6.0.3790.3959); Fri, 8 May 2009 11:01:43 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Need help with ad-do-it, it loops Thread-Index: AcnPYXVEOW1WcnmNS72donIUYSxjIAAWb8XA X-OriginalArrivalTime: 08 May 2009 09:01:43.0322 (UTC) FILETIME=[9B9AD7A0:01C9CFBB] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 08 May 2009 05:55:40 -0400 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:110769 Archived-At: 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=FCngliche Nachricht----- Von: emacs-devel-bounces+klaus.berndl=3Dsdm.de@gnu.org = [mailto:emacs-devel-bounces+klaus.berndl=3Dsdm.de@gnu.org] 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=E9mi) 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=E9mi 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)