[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 856ebe246b 020/372: properly ignore non-annotatio
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 856ebe246b 020/372: properly ignore non-annotation overlays |
Date: |
Fri, 4 Feb 2022 16:58:15 -0500 (EST) |
branch: elpa/annotate
commit 856ebe246bd592c1523876054188734443b7e1f7
Author: Bastian Bechtold <bb@mo30211.hs-woe.de>
Commit: Bastian Bechtold <bb@mo30211.hs-woe.de>
properly ignore non-annotation overlays
---
annotate.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/annotate.el b/annotate.el
index 3afa814b69..489b299f14 100644
--- a/annotate.el
+++ b/annotate.el
@@ -111,8 +111,7 @@
(defun annotate-save-annotations ()
"Save all annotations to disk."
(interactive)
- (let ((file-annotations
- (mapcar 'annotate-describe-annotation (overlays-in 0 (buffer-size))))
+ (let ((file-annotations (annotate-describe-annotations))
(all-annotations (annotate-load-annotation-data)))
(if (assoc-string (buffer-file-name) all-annotations)
(setcdr (assoc-string (buffer-file-name) all-annotations)
@@ -222,12 +221,19 @@
((thing-at-point 'symbol) (cdr (bounds-of-thing-at-point 'symbol)))
(t (1+ (point))))))
-(defun annotate-describe-annotation (highlight)
- "Return list that describes the overlay `highlight`."
- (list
- (overlay-start highlight)
- (overlay-end highlight)
- (overlay-get highlight 'annotation)))
+(defun annotate-describe-annotations ()
+ "Return a list of all annotations in the current buffer."
+ (let ((overlays (overlays-in 0 (buffer-size))))
+ (setq overlays
+ (remove-if
+ (lambda (ov)
+ (eq nil (overlay-get ov 'annotation)))
+ overlays))
+ (mapcar (lambda (ov)
+ (list (overlay-start ov)
+ (overlay-end ov)
+ (overlay-get ov 'annotation)))
+ overlays)))
(defun annotate-load-annotation-data ()
"Read and return saved annotations."
- [nongnu] elpa/annotate aa075cfe04 002/372: change annotation display from overlay to property, (continued)
- [nongnu] elpa/annotate aa075cfe04 002/372: change annotation display from overlay to property, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 94c2a9455f 019/372: increment version number, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 530b4aa78a 022/372: increment version number, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f2bcc95e8b 024/372: add melpa links, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a6f7279a4c 016/372: fixed typos and version error, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 0bd3bdce01 017/372: improved README, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ffac176c22 021/372: fix upside-down annotation construction, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 936f081575 005/372: doesn't create empty annotations any more, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate fc2c0395d7 007/372: add missing require, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6372f8e340 009/372: implement save and load, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 856ebe246b 020/372: properly ignore non-annotation overlays,
ELPA Syncer <=
- [nongnu] elpa/annotate 8f252d2892 025/372: clear-annotations does not clear all overlays, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2084f831bc 026/372: added export functionality as sort-of-diffscuss, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 52f0d97e51 030/372: new version and documentation, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b0266c6350 047/372: version 0.4.1, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4647264264 049/372: auto-reflow annotations when frame size changes, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 785b5aea7f 042/372: rework annotation display logic, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate d6a4fcc18e 035/372: add next-annotation and previous-annotation keys, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f5711b4f27 067/372: - prevent crash and error when a frame's width is less than value of, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1a43bfbb1e 061/372: fixes bug with annotations ending on beginning-of-line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9ffdc1f762 060/372: fix for annotations with wide characters, ELPA Syncer, 2022/02/04