emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/annotate 676d9863f9 048/372: fix undo bug


From: ELPA Syncer
Subject: [nongnu] elpa/annotate 676d9863f9 048/372: fix undo bug
Date: Fri, 4 Feb 2022 16:58:18 -0500 (EST)

branch: elpa/annotate
commit 676d9863f9e3e19fa158474d1490c23535e93d3b
Author: Bastian Bechtold <bb@Mr-Bigglesworth.local>
Commit: Bastian Bechtold <bb@Mr-Bigglesworth.local>

    fix undo bug
    
    undo will not re-create annotations any longer.
---
 README.md   | 4 ++--
 annotate.el | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index ba1e9e93f9..63eb44187e 100644
--- a/README.md
+++ b/README.md
@@ -72,5 +72,5 @@ This package is released under the MIT license.
 - **2015-09-23 V0.4.0 Bastian Bechtold**  
   Completely reworked the display engine for annotations. You can now have 
several annotations per line, and annotations should not move any more when 
editing the line they are on. Finally, annotations can now span several lines.
 
-- **2015-10-06 V0.4.1 Bastian Bechtold**  
-  Bugfixes. No more hidden newlines, no more error messages with annotations 
at bol, mark deactivated after creating annotation.
+- **2015-10-06 V0.4.2 Bastian Bechtold**  
+  Bugfixes. No more hidden newlines, no more annotations in undo-list, no more 
error messages with annotations at bol, mark deactivated after creating 
annotation.
diff --git a/annotate.el b/annotate.el
index 4a5d7efc46..540f1b13d0 100644
--- a/annotate.el
+++ b/annotate.el
@@ -5,7 +5,7 @@
 ;; Maintainer: Bastian Bechtold
 ;; URL: https://github.com/bastibe/annotate.el
 ;; Created: 2015-06-10
-;; Version: 0.4.1
+;; Version: 0.4.2
 
 ;; This file is NOT part of GNU Emacs.
 
@@ -50,7 +50,7 @@
 ;;;###autoload
 (defgroup annotate nil
   "Annotate files without changing them."
-  :version "0.4.1"
+  :version "0.4.2"
   :group 'text)
 
 ;;;###autoload
@@ -390,6 +390,8 @@ annotation plus the newline."
   "Cleans up annotation properties associated with a region."
   ;; inhibit infinite loop
   (setq inhibit-modification-hooks t)
+  ;; inhibit property removal to the undo list
+  (buffer-disable-undo)
   (save-excursion
     (goto-char end)
     ;; go to the EOL where the
@@ -398,6 +400,7 @@ annotation plus the newline."
     ;; strip dangling display property
     (remove-text-properties
      (point) (1+ (point)) '(display nil)))
+  (buffer-enable-undo)
   (setq inhibit-modification-hooks nil))
 
 (defun annotate--change-guard ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]