From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joshua Varner Newsgroups: gmane.emacs.devel Subject: Re: reproducible but very odd make-mode crash Date: Wed, 25 May 2005 16:32:08 -0500 Message-ID: <92a5eb4705052514329db89b6@mail.gmail.com> References: <92a5eb47050524143311fc0d86@mail.gmail.com> Reply-To: Joshua Varner NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1117057453 28931 80.91.229.2 (25 May 2005 21:44:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 May 2005 21:44:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 25 23:44:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Db3eO-0003xm-FT for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 23:42:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Db3iK-0006Ah-Ok for ged-emacs-devel@m.gmane.org; Wed, 25 May 2005 17:46:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Db3ff-0005DX-ST for emacs-devel@gnu.org; Wed, 25 May 2005 17:44:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Db3fW-00058s-AX for emacs-devel@gnu.org; Wed, 25 May 2005 17:44:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Db3fR-000589-8Y for emacs-devel@gnu.org; Wed, 25 May 2005 17:43:59 -0400 Original-Received: from [64.233.162.196] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Db3UX-0000Y6-Vw for emacs-devel@gnu.org; Wed, 25 May 2005 17:32:42 -0400 Original-Received: by zproxy.gmail.com with SMTP id 40so49411nzk for ; Wed, 25 May 2005 14:32:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=D+Oq3LKphhI0e9ZLfTG/9PZv/Bkvf7/ug8WqpYm5NGILTfCVFNDCIcpDAmDrYsfOrhAOXH74TyZxE/pfxLzvGocGUOjn3+bNINbvG2yNNnDdXNy0bThzeNuPumoOu4Nzj1l1AUw/o+Wgp79ysd0Xw4dM9TgArP3Mb9POZAkC5Xw= Original-Received: by 10.36.129.11 with SMTP id b11mr346712nzd; Wed, 25 May 2005 14:32:08 -0700 (PDT) Original-Received: by 10.36.115.17 with HTTP; Wed, 25 May 2005 14:32:08 -0700 (PDT) Original-To: emacs-devel@gnu.org In-Reply-To: <92a5eb47050524143311fc0d86@mail.gmail.com> Content-Disposition: inline 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:37643 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37643 The following patch resolves the problem i was having (I could only reproduce this on my machine at work with RH9.0, but it was consistent on that machine). By restricting the regexp to the current line (sort of) i was able to avoid whatever strange thing was causing the regexp to loop infinitely. I tried to use string-match but received some out of range errors, I don't know what caused those, but that may be faster than the narrowing. I, however, didn't notice any speed issue. Josh P.S. I don't know if this counts as trivial or not, but if you need papers from me just let me know what I should do. emacs]$ cvs diff -u lisp/progmodes/make-mode.el Index: lisp/progmodes/make-mode.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/lisp/progmodes/make-mode.el,v retrieving revision 1.97 diff -u -r1.97 make-mode.el --- lisp/progmodes/make-mode.el 21 May 2005 02:45:27 -0000 1.97 +++ lisp/progmodes/make-mode.el 25 May 2005 21:23:43 -0000 @@ -1687,8 +1687,10 @@ (or (eq (char-after) ?=3D) (get-text-property (1- (point)) 'face) (when (save-excursion - (beginning-of-line) - (looking-at makefile-dependency-regex)) + (save-restriction + (narrow-to-region pt (point)) + (beginning-of-line) + (looking-at makefile-dependency-regex))) (end-of-line) (throw 'found (point))))) (goto-char pt))