[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate cc9393c6bd 318/372: - when annotationg a newline,
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate cc9393c6bd 318/372: - when annotationg a newline, replace annotation if a single one |
Date: |
Fri, 4 Feb 2022 16:59:15 -0500 (EST) |
branch: elpa/annotate
commit cc9393c6bd1b38789ba097ed8382134e0076cc46
Author: cage <cage@localhost>
Commit: cage <cage@invalid>
- when annotationg a newline, replace annotation if a single one
exists on the line that is going to be annotated.
---
annotate.el | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/annotate.el b/annotate.el
index af88620e76..51ebc2c962 100644
--- a/annotate.el
+++ b/annotate.el
@@ -595,11 +595,23 @@ specified by `from' and `to'."
(when delete-enclosed
(annotate-delete-chains-in-region chain-end region-stop))))
(annotate-line (eol)
- (let* ((bol (annotate-beginning-of-line-pos)))
- (goto-char bol)
- (set-mark (point))
- (goto-char eol)
- (annotate-annotate))))
+ (let* ((bol
(annotate-beginning-of-line-pos))
+ (annotations-on-the-line
(annotate-annotations-overlay-in-range bol
+
eol)))
+ (if (= (length annotations-on-the-line)
+ 1)
+ (let* ((annotation (cl-first annotations-on-the-line))
+ (start-overlay (overlay-start annotation))
+ (end-overlay (overlay-end annotation)))
+ (goto-char end-overlay)
+ (push-mark start-overlay t t)
+ (annotate-change-annotation (overlay-start annotation))
+ (pop-mark))
+ (progn
+ (goto-char bol)
+ (push-mark (point) t t)
+ (goto-char eol)
+ (annotate-annotate))))))
(let ((annotation (annotate-annotation-at (point))))
(cond
((use-region-p)
@@ -657,7 +669,8 @@ specified by `from' and `to'."
(if (/= eol bol)
(annotate-line eol)
(progn
- (goto-char (1+ eol))
+ (forward-line 1)
+ (goto-char (annotate-end-of-line-pos))
(annotate-annotate))))))))))))
(set-buffer-modified-p t))))
- [nongnu] elpa/annotate 99c45f553e 225/372: Merge pull request #67 from cage2/new-stable-version, (continued)
- [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, 2022/02/04
- [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 <=
- [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
- [nongnu] elpa/annotate 07667d4ccb 314/372: - updated version number in top comment block., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 641daae9d0 335/372: - updated docs and version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b74bade94c 345/372: - increased version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e6af7f8ef7 058/372: workaround for nil file name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate eb01c0cfbb 077/372: - removed copyright line from README., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d2841bad65 325/372: - ensured all annotations are saved before showing summary window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6239d033ce 355/372: - updated README.org mentioning 'annotate-y-or-n-prompt-function'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 04a5710cf6 334/372: - prevented saving a file whith an empty database;, ELPA Syncer, 2022/02/04