From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13542: 24.3.50; args-out-of-range in jit-lock-fontify-now Date: Wed, 30 Jan 2013 12:06:05 -0500 Message-ID: References: <87mwvyxty3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1359565590 5935 80.91.229.3 (30 Jan 2013 17:06:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2013 17:06:30 +0000 (UTC) Cc: 13542@debbugs.gnu.org To: Aaron Ecay Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 30 18:06:49 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U0b7Y-0006Xm-Sk for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jan 2013 18:06:48 +0100 Original-Received: from localhost ([::1]:41535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0b7G-0001HG-Oa for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jan 2013 12:06:30 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0b7D-0001H4-Ne for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 12:06:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0b7A-0002g9-MD for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 12:06:27 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0b7A-0002g5-JW for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 12:06:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U0b7l-0001iS-Sy for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 12:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jan 2013 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13542 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13542-submit@debbugs.gnu.org id=B13542.13595656056572 (code B ref 13542); Wed, 30 Jan 2013 17:07:01 +0000 Original-Received: (at 13542) by debbugs.gnu.org; 30 Jan 2013 17:06:45 +0000 Original-Received: from localhost ([127.0.0.1]:55968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b7U-0001hx-LR for submit@debbugs.gnu.org; Wed, 30 Jan 2013 12:06:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:20913) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0b7T-0001hr-Il for 13542@debbugs.gnu.org; Wed, 30 Jan 2013 12:06:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgEFABK/CFG4rw3e/2dsb2JhbABEhke0boNZF3OCHgEBBAEjMyMFCwsaAhgOAgIUGA0kiB4Grl+SToEjjlSBEwOIYZwZgV6DFYFIJA X-IPAS-Result: AgEFABK/CFG4rw3e/2dsb2JhbABEhke0boNZF3OCHgEBBAEjMyMFCwsaAhgOAgIUGA0kiB4Grl+SToEjjlSBEwOIYZwZgV6DFYFIJA X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35665" Original-Received: from 184-175-13-222.dsl.teksavvy.com (HELO ceviche.home) ([184.175.13.222]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 12:06:05 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 76183660D9; Wed, 30 Jan 2013 12:06:05 -0500 (EST) In-Reply-To: <87mwvyxty3.fsf@gmail.com> (Aaron Ecay's message of "Thu, 24 Jan 2013 14:27:32 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70470 Archived-At: > The issue is that the min value for the region to be fontified is > calculated with the buffer temporarily widened (by the function > =E2=80=98jit-lock-stealth-chunk-start=E2=80=99), but =E2=80=98jit-lock-fo= ntify-now=E2=80=99 does not > widen the buffer. That's a left over from the 2002-10-01 change that decided that jit-lock should not widen. I've installed the patch below which should fix the problem. Stefan =3D=3D=3D modified file 'lisp/jit-lock.el' --- lisp/jit-lock.el 2013-01-13 01:23:48 +0000 +++ lisp/jit-lock.el 2013-01-30 16:59:53 +0000 @@ -439,8 +435,6 @@ Value is nil if there is nothing more to fontify." (if (zerop (buffer-size)) nil - (save-restriction - (widen) (let* ((next (text-property-not-all around (point-max) 'fontified t)) (prev (previous-single-property-change around 'fontified)) (prop (get-text-property (max (point-min) (1- around)) @@ -473,7 +467,7 @@ ((null next) start) ((< (- around start) (- next around)) start) (t next)))) - result)))) + result))) =20 (defun jit-lock-stealth-fontify (&optional repeat) "Fontify buffers stealthily. @@ -564,6 +558,8 @@ (when jit-lock-context-unfontify-pos ;; (message "Jit-Context %s" (buffer-name)) (save-restriction + ;; Don't be blindsided by narrowing that starts in the middle + ;; of a jit-lock-defer-multiline. (widen) (when (and (>=3D jit-lock-context-unfontify-pos (point-min)) (< jit-lock-context-unfontify-pos (point-max)))