[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate ef82c4313b 3/7: - wrapped raw chain manipulation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate ef82c4313b 3/7: - wrapped raw chain manipulation with 'annotate-chain-last-ring' to get the last segment of a chain. |
Date: |
Fri, 10 Mar 2023 10:00:44 -0500 (EST) |
branch: elpa/annotate
commit ef82c4313bfb2428328d3bb76bff0750ba8abaa1
Author: cage <cage>
Commit: cage <cage@invalid>
- wrapped raw chain manipulation with 'annotate-chain-last-ring' to get the
last segment of a chain.
---
annotate.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/annotate.el b/annotate.el
index 683ff2efe1..60373a118b 100644
--- a/annotate.el
+++ b/annotate.el
@@ -432,6 +432,10 @@ annotated text?
See: `ANNOTATE-ANNOTATION-POSITION-POLICY'."
(overlay-get annotation 'force-newline-policy))
+(defun annotate-chain-last-ring (chain)
+ "Get the last ring of `CHAIN'"
+ (car (last chain)))
+
(defun annotate--remap-chain-pos (annotations)
"Remap `ANNOTATIONS' as an annotation 'chain'.
@@ -827,7 +831,7 @@ specified by `FROM' and `TO'."
"Hide annotation's text at current cursor's point, if such annotation exists"
(interactive)
(when-let* ((chain (annotate-chain-at (point)))
- (last-ring (car (last chain))))
+ (last-ring (annotate-chain-last-ring chain)))
(if (annotate-tail-overlay-hide-text-p last-ring)
(annotate-chain-show-text chain)
(annotate-chain-hide-text chain))
@@ -837,7 +841,7 @@ specified by `FROM' and `TO'."
(interactive)
(let ((chains (annotate-annotations-chain-in-range 0 (buffer-size))))
(dolist (chain chains)
- (if (annotate-tail-overlay-hide-text-p (car (last chain)))
+ (if (annotate-tail-overlay-hide-text-p (annotate-chain-last-ring chain))
(annotate-chain-show-text chain)
(annotate-chain-hide-text chain))))
(font-lock-flush))
@@ -2037,11 +2041,11 @@ in a chain of annotations as last."
(annotate-find-chain (annotate-annotation-at pos)))
(defun annotate-chain-hide-text (chain)
- (let ((last-ring (car (last chain))))
+ (let ((last-ring (annotate-chain-last-ring chain)))
(overlay-put last-ring 'hide-text t)))
(defun annotate-chain-show-text (chain)
- (let ((last-ring (car (last chain))))
+ (let ((last-ring (annotate-chain-last-ring chain)))
(overlay-put last-ring 'hide-text nil)))
(defun annotate-chain-hide-text-p (chain)
- [nongnu] elpa/annotate updated (e433ec6803 -> 265ac1a905), ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate 68ae53c922 1/7: - added a new command 'annotate-toggle-annotation-text' (and related functions/variables)., ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate 265ac1a905 7/7: Merge pull request #150 from cage2/hide-annotation-text, ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate e447a2f817 4/7: - added missing docstrings., ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate ef82c4313b 3/7: - wrapped raw chain manipulation with 'annotate-chain-last-ring' to get the last segment of a chain.,
ELPA Syncer <=
- [nongnu] elpa/annotate 44349cef8b 6/7: - increased version number;, ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate 4bd488a5ca 2/7: - added command 'annotate-toggle-all-annotations-text';, ELPA Syncer, 2023/03/10
- [nongnu] elpa/annotate 3f3444cd18 5/7: - removed repeated code., ELPA Syncer, 2023/03/10