From: Le Wang <l26wang@gmail.com>
To: 12361@debbugs.gnu.org
Subject: bug#12361: hilit-chg.el bug causes conflict with yasnippet (patch included)
Date: Thu, 6 Sep 2012 01:14:14 +0800 [thread overview]
Message-ID: <CAM=K+iothGDHsGnCd5fn=9sNc7xRY0jqe-5RYKjmYgVkAe8J3g@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 275 bytes --]
hilit changes assumes that if the end has hilit-chg-delete property,
property between END and (+ 1 END) be set. This isn't true if the buffer
has been narrowed, which yasnippet does regularly.
Attached patch fixes it. I'm not completely sure if it's the best fix.
--
Le
[-- Attachment #1.2: Type: text/html, Size: 350 bytes --]
[-- Attachment #2: hilit-chg.el.patch --]
[-- Type: application/octet-stream, Size: 739 bytes --]
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 0970ece..20d4437 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -592,8 +592,9 @@ This allows you to manually remove highlighting from uninteresting changes."
;; text then remove the deletion marking, but set it to
;; changed otherwise its highlighting disappears.
(if (eq (get-text-property end 'hilit-chg) 'hilit-chg-delete)
- (progn
- (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg)
+ (save-restriction
+ (widen)
+ (put-text-property end (+ end 1) 'hilit-chg 'hilit-chg)
(if highlight-changes-visible-mode
(hilit-chg-fixup beg (+ end 1))))))
(unless no-property-change
next reply other threads:[~2012-09-05 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 17:14 Le Wang [this message]
2012-12-07 5:00 ` bug#12361: hilit-chg.el bug causes conflict with yasnippet (patch included) Stefan Monnier
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=K+iothGDHsGnCd5fn=9sNc7xRY0jqe-5RYKjmYgVkAe8J3g@mail.gmail.com' \
--to=l26wang@gmail.com \
--cc=12361@debbugs.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.