[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate a04a6144aa 240/372: Merge pull request #75 from c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate a04a6144aa 240/372: Merge pull request #75 from cage2/master |
Date: |
Fri, 4 Feb 2022 16:59:03 -0500 (EST) |
branch: elpa/annotate
commit a04a6144aaf31b2547f0988dff1f035fb8aa20ae
Merge: 99d99e5bcb 553116dc61
Author: cage2 <1257703+cage2@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #75 from cage2/master
Added dependency on info and removed duplicated operation
---
Changelog | 7 +++++++
NEWS.org | 3 +++
annotate.el | 26 +++++++++++++++++++-------
3 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/Changelog b/Changelog
index 101524003c..badeb620e7 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,10 @@
+2020-07-01
+ * annotate.el (annotate-change-annotation)
+
+ - ensured that the modified status of as buffer is not modified by the
local
+ function 'delete' in 'annotate-change-annotation';
+ - added dependency on 'info'.
+
2020-06-26
* annotate.el (annotate-switch-db)
- Added file argument 'database-file-path',
diff --git a/NEWS.org b/NEWS.org
index 5d65662c4e..25e31feb82 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -120,3 +120,6 @@
- 2020-06-26 V0.8.1 Bastian Bechtold, cage ::
Added file argument to ~annotate-switch-db~.
+
+- 2020-07-01 V0.8.2 Bastian Bechtold, cage ::
+ Added explicit dependency on 'info' and removed a duplicated operation.
diff --git a/annotate.el b/annotate.el
index a176abcf9e..3677e2ab3e 100644
--- a/annotate.el
+++ b/annotate.el
@@ -50,12 +50,15 @@
;; can not be annotated.
;;; Code:
+
+(require 'info)
+
(require 'cl-lib)
;;;###autoload
(defgroup annotate nil
"Annotate files without changing them."
- :version "0.8.1"
+ :version "0.8.2"
:group 'text)
;;;###autoload
@@ -278,6 +281,14 @@ annotation as defined in the database."
,@body)
(setf inhibit-modification-hooks ,old-mode)))))
+(cl-defmacro annotate-with-restore-modified-bit (&rest body)
+ "Save the value of `buffer-modified-p' before `body' is exectuted
+ and restore the saved value just after the end of `body'."
+ (let ((modifiedp (gensym)))
+ `(let ((,modifiedp (buffer-modified-p)))
+ ,@body
+ (set-buffer-modified-p ,modifiedp))))
+
(defun annotate-end-of-line-pos ()
"Get the position of the end of line and rewind the point's
position (so that it is unchanged after this function is called)."
@@ -1320,7 +1331,7 @@ annotation."
(overlay-end ov))
(delete-overlay ov)
(setf modifiedp t)
- (set-buffer-modified-p modifiedp))))
+ (set-buffer-modified-p modifiedp))))
(defun annotate-string-empty-p (a)
"Is the arg an empty string or null?"
@@ -1593,13 +1604,14 @@ The searched interval can be customized setting the
variable:
(annotation-text (read-from-minibuffer annotate-annotation-prompt
(overlay-get highlight
'annotation))))
(cl-labels ((delete (annotation)
- (let ((chain (annotate-find-chain annotation)))
- (dolist (single-element chain)
- (goto-char (overlay-end single-element))
- (move-end-of-line nil)
+ (let ((chain (annotate-find-chain annotation)))
+ (annotate-with-restore-modified-bit
+ (dolist (single-element chain)
+ (goto-char (overlay-end single-element))
+ (move-end-of-line nil)
(annotate--remove-annotation-property (overlay-start
single-element)
(overlay-end
single-element))
- (delete-overlay single-element))))
+ (delete-overlay single-element)))))
(change (annotation)
(let ((chain (annotate-find-chain annotation)))
(dolist (single-element chain)
- [nongnu] elpa/annotate 4fde80fe79 168/372: - updated software version number in the comment on top of the source code;, (continued)
- [nongnu] elpa/annotate 4fde80fe79 168/372: - updated software version number in the comment on top of the source code;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 696f4ee0cd 167/372: Merge pull request #55 from cage2/update-doc, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a59cc2c6b2 172/372: - when 'delete' button from a summary window is activated redraw and, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 412053cefc 173/372: - [bugfix] When a window is resized ensure that the sizes are, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 41e85c8435 176/372: - increased version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cc4292cce4 181/372: - moved the test for 'limit' up in the lambda of the filtering, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f4cc83ec84 189/372: Merge branch 'master' into org-mode-fix, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate bcffdb9f24 202/372: - added some missing docstrings., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 99c45f553e 225/372: Merge pull request #67 from cage2/new-stable-version, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d4b555d237 242/372: Merge pull request #76 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a04a6144aa 240/372: Merge pull request #75 from cage2/master,
ELPA Syncer <=
- [nongnu] elpa/annotate a4607c4184 273/372: - updated version and documentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate daf4c3c726 283/372: - removed code, in integration procedures, that should never runs., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3239275a5b 265/372: - fitted 'annotate-position-inside-chain-p' into, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b68170837e 279/372: - fixed the width of the last row of the box, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 958ce126e0 272/372: - fixed more typos., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d55c48f508 304/372: changed function from 'font-lock-fontify-buffer' to 'font-lock-ensure'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 876f1425d2 310/372: - removed another useless argument from call to 'font-lock-flush'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cc9393c6bd 318/372: - when annotationg a newline, replace annotation if a single one, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 92434b63ff 323/372: - improved documentation and fixed indentation for a couple of local functions., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a45584c53f 358/372: - removed customizable function 'annotate-y-or-n-prompt-function'., ELPA Syncer, 2022/02/04