all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Fix for org-mode fontification (Bug#25132) fix on emacs-25?
Date: Mon, 20 Mar 2017 22:11:45 -0400	[thread overview]
Message-ID: <CAM-tV-8mk70xag8ev_JFu72SR=Hhg9g3zVS9shknimDk=Ds=YQ@mail.gmail.com> (raw)

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



             reply	other threads:[~2017-03-21  2:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  2:11 Noam Postavsky [this message]
2017-03-21  3:30 ` Fix for org-mode fontification (Bug#25132) fix on emacs-25? Eli Zaretskii
2017-03-21 13:23   ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-8mk70xag8ev_JFu72SR=Hhg9g3zVS9shknimDk=Ds=YQ@mail.gmail.com' \
    --to=npostavs@users.sourceforge.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.