From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Fix for org-mode fontification (Bug#25132) fix on emacs-25? Date: Mon, 20 Mar 2017 22:11:45 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1490062320 2019 195.159.176.226 (21 Mar 2017 02:12:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Mar 2017 02:12:00 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 21 03:11:55 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cq9H2-0007su-R4 for ged-emacs-devel@m.gmane.org; Tue, 21 Mar 2017 03:11:48 +0100 Original-Received: from localhost ([::1]:36260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cq9H8-0008Lz-Q5 for ged-emacs-devel@m.gmane.org; Mon, 20 Mar 2017 22:11:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cq9H2-0008Li-Gu for emacs-devel@gnu.org; Mon, 20 Mar 2017 22:11:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cq9H1-0007Fr-DN for emacs-devel@gnu.org; Mon, 20 Mar 2017 22:11:48 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:34321) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cq9H1-0007Fb-9D for emacs-devel@gnu.org; Mon, 20 Mar 2017 22:11:47 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id w81so30962644oig.1 for ; Mon, 20 Mar 2017 19:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=D5Pm3L/LFh9hr8iFoWrZK9ykn15Btb8ASJiikLbsdu4=; b=tFUuieODCuwUaMneNfJU495TYg9UwK6rnf+bTAGEFiMI5DKRvC1OVUMNzyMLrSKZMQ c8RTbW/NGZPXFuFLPuTBUwcZ6AZ84hPbr77/0kxGwpBOPXngVfasoJFiF2vV4qcVTEH5 PuRt19hw5iZpVJ9vrkDyzbfhEdDPyuslf5WN5SWeuac1oVpPFTslnSEh6lsQGoahoU7W A9ne0cG9PwDzxlbm0cRpG4y0V8Gddw7Y9fv5vr0Dkj/w0htpWxbc3BGGbYKrvLC7fBr7 /vxFMj9cTC2tDkb5l0ghknTV7uJLL8uJTIGS9qa1AAm8vQ3jPK5cfnh0vbfTj8PRfXKj 9Ikg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=D5Pm3L/LFh9hr8iFoWrZK9ykn15Btb8ASJiikLbsdu4=; b=Y/cgstiYxjuFmgj+HAaBfe7TPeJHm5HkHopr4xLSFdcLwm4+GHCkDQqObyQ67i1Fph cKVAFHA8v8tsjjqtjk2Fz7Yy31WGXdwJ/eiA9YspzX7okTvsVL3AWbK4Rqrn7W7nbdPU Vr7HHUMRvXSTmnl7k84VYAiEDbgKKp1n23aymAPiaCzXf1yvgjnn84Qyg1X22QGCcvYr DUUCTfqCYo1MtaLIlmknp9wAnTLJ4tEnzun0j2ct40p0zk6x2g3y4TMNdMhlvwPkhcyJ /M0Fg9aiRCkKGBUfTMlnv8js73orKGy22VIqqpJYrl2z2i5x1NtZiKWh7rgXEt3y9P4N pEcg== X-Gm-Message-State: AFeK/H2qq0+0OMt1a70gJOXJ3AqRi83qLbHbEqel1JA149JW9lHJGV732FIIe581TGcLsixr3859odk8p67hww== X-Received: by 10.202.89.139 with SMTP id n133mr16032648oib.70.1490062306308; Mon, 20 Mar 2017 19:11:46 -0700 (PDT) Original-Received: by 10.157.80.172 with HTTP; Mon, 20 Mar 2017 19:11:45 -0700 (PDT) X-Google-Sender-Auth: PLlrvE2H6-426c3_P--P9JxF4QU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213192 Archived-At: Hi, I goofed when pushing the fix for Bug#25132, for some reason I decided to extend let-binding wider than my initial patch. This causes a fontification error when combined with some other (undetermined, but Spacemacs was mentioned) packages [1]. Fixed with the diff below (ignoring whitespace changes for readability) which narrows the scope of the let-binding (the let-binding was introduced for 25.2 to fix #25132). Should this go to emacs-25? diff --git i/lisp/org/org-src.el w/lisp/org/org-src.el index a02402cf60..16aa443232 100644 --- i/lisp/org/org-src.el +++ w/lisp/org/org-src.el @@ -917,17 +917,17 @@ org-src-font-lock-fontify-block ;; the org-src-fontification buffer in case we're called ;; from `jit-lock-function' (Bug#25132). (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) - (insert string " ") ;; so there's a final property change + (insert string " ")) ;; so there's a final property change (unless (eq major-mode lang-mode) (funcall lang-mode)) (org-font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (put-text-property (+ start (1- pos)) (1- (+ start next)) 'face (get-text-property pos 'face) org-buffer) - (setq pos next)))) + (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modified-p modified))))) [1]: http://lists.gnu.org/archive/html/emacs-orgmode/2017-03/msg00420.html