[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate bd12129213 333/372: Merge pull request #106 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate bd12129213 333/372: Merge pull request #106 from cage2/fixed-call-comment-region |
Date: |
Fri, 4 Feb 2022 16:59:17 -0500 (EST) |
branch: elpa/annotate
commit bd12129213f5b87aaffc6a6dca25c3c2e4b68301
Merge: ff3a0089e0 e37820134f
Author: cage2 <1257703+cage2@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #106 from cage2/fixed-call-comment-region
Prevented calling 'annotate--remove-annotation-property' on a narrowed
buffer
---
Changelog | 14 ++++++++++++++
NEWS.org | 5 +++++
annotate.el | 11 +++++------
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/Changelog b/Changelog
index c5c0849036..e7434ad668 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,17 @@
+021-04-30 cage
+
+ * annotate.el:
+
+ - prevented calling 'annotate--remove-annotation-property' on a
+ narrowed buffer.
+
+ For some reason (perhaps related to font-locking?) comment-region
+ command was calling this function, the fact is that the command
+ narrows the buffer before actually adding comments, so the call to
+ `point' inside the annotate--remove-annotation-property's body may
+ fall outside of the buffer raising an error. This patch prevents
+ calling this function on narrowed buffer.
+
2021-04-23 cage
* annotate.el:
diff --git a/NEWS.org b/NEWS.org
index 0b00ae34b4..eb3d0be647 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -226,3 +226,8 @@
Finally annotating read-only buffers (especially deleting
annotations) should works without problems.
+
+- 2021-05-05 V1.2.1 Bastian Bechtold, cage ::
+
+ This version fixes a bug that prevented command like
+ 'comment-region' to works properly when annotate-mode was active.
diff --git a/annotate.el b/annotate.el
index 4b9d932ed7..6ff3fc2ad1 100644
--- a/annotate.el
+++ b/annotate.el
@@ -7,7 +7,7 @@
;; Maintainer: Bastian Bechtold
;; URL: https://github.com/bastibe/annotate.el
;; Created: 2015-06-10
-;; Version: 1.2.0
+;; Version: 1.2.1
;; This file is NOT part of GNU Emacs.
@@ -58,7 +58,7 @@
;;;###autoload
(defgroup annotate nil
"Annotate files without changing them."
- :version "1.2.0"
+ :version "1.2.1"
:group 'text)
;;;###autoload
@@ -1228,8 +1228,8 @@ a a**
(defun annotate--remove-annotation-property (begin end)
"Cleans up annotation properties associated with a region."
- (when (> (buffer-size)
- 0)
+ (when (and (> (buffer-size) 0)
+ (not (buffer-narrowed-p)))
(annotate-with-inhibit-modification-hooks
(annotate-with-disable-read-only
;; copy undo list
@@ -1242,8 +1242,7 @@ a a**
;; annotated newline used to be
(end-of-line)
;; strip dangling display property
- (remove-text-properties
- (point) (1+ (point)) '(display nil)))
+ (remove-text-properties (point) (1+ (point)) '(display nil)))
;; restore undo list
(setf buffer-undo-list saved-undo-list)
(buffer-enable-undo))))))
- [nongnu] elpa/annotate ac55086d60 301/372: - fixed typo., (continued)
- [nongnu] elpa/annotate ac55086d60 301/372: - fixed typo., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3415b7ac08 321/372: - changed behaviour when user is annotation a newline character;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f33eecba7b 362/372: - prevented asking to delete a database that does not actually exists, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1350e1d073 338/372: - fixed annotated text shown in the summary window, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e3c1b1066 368/372: - fixed function name;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a484ffa0b6 319/372: - allowed removing (or cutting) annotations when buffer is in read-only mode., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 936389e36a 316/372: - prevented asking for annotation when trying to annotate a newline character., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 36d3729c27 339/372: - updated version number and docs., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a8762cd08a 344/372: - removed garbage at the end of an error message., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9aba6305fe 342/372: Merge pull request #109 from cage2/fix-replace-button, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate bd12129213 333/372: Merge pull request #106 from cage2/fixed-call-comment-region,
ELPA Syncer <=
- [nongnu] elpa/annotate 83e81e0979 369/372: - added missing docstrings and improved a bit the old ones., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f5436b2bff 366/372: - added helper functions to manage annotation's interval and 'annotate-db-merge-annotations'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 59c52e7318 162/372: - updated documentation to reflects changes in the code, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate fd9c403ecc 164/372: - changed quotation mark sentence., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a28e7b4fd2 028/372: refactored and documented export function, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b2cd959cfa 053/372: Annotations of long lines start at the next line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e98c93a12b 072/372: - added 'annotate-' prefix to public symbols;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6289c87bf8 029/372: annotation buffer now has proper file name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1daa61b99 065/372: use `locate-user-emacs-file` to specify default save file, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 392197f943 155/372: Merge branch 'master' into annotations-on-their-own-line, ELPA Syncer, 2022/02/04