branch: elpa/annotate commit 5e2609e16e640ce388cb16c006af49f0e384b293 Author: cage <cage-invalid@invalid> Commit: cage <cage-invalid@invalid>
- optimized 'annotate-previous-annotation-ends' and 'annotate-next-annotation-starts'. --- annotate.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/annotate.el b/annotate.el index 9d788585d2..4fa6bb9041 100644 --- a/annotate.el +++ b/annotate.el @@ -1578,10 +1578,10 @@ was found. NOTE this assumes that annotations never overlaps" (cl-labels ((previous-annotation-ends (start) (let ((annotation (annotate-annotation-at start))) - (while (and (>= (1- start) + (while (and (/= start (point-min)) (null annotation)) - (setf start (1- start)) + (setf start (previous-overlay-change start)) (setf annotation (annotate-annotation-at start))) annotation))) (let ((annotation (annotate-annotation-at pos))) @@ -1595,10 +1595,10 @@ was found. NOTE this assumes that annotations never overlaps" (cl-labels ((next-annotation-ends (start) (let ((annotation (annotate-annotation-at start))) - (while (and (<= (1+ start) + (while (and (/= start (point-max)) (null annotation)) - (setf start (1+ start)) + (setf start (next-overlay-change start)) (setf annotation (annotate-annotation-at start))) annotation))) (let ((annotation (annotate-annotation-at pos)))