emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hl-block-mode 59cdbd4d27 39/64: Use "push" instead of add-


From: ELPA Syncer
Subject: [nongnu] elpa/hl-block-mode 59cdbd4d27 39/64: Use "push" instead of add-to-list
Date: Thu, 7 Jul 2022 12:00:07 -0400 (EDT)

branch: elpa/hl-block-mode
commit 59cdbd4d270ca45066052afb6afc63e95fc70387
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Use "push" instead of add-to-list
    
    The order in the list is not important, push is faster.
---
 hl-block-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hl-block-mode.el b/hl-block-mode.el
index 481f3f580f..8934586c8c 100644
--- a/hl-block-mode.el
+++ b/hl-block-mode.el
@@ -144,8 +144,8 @@ Inverse of `color-values'."
                       (cl-mapcar `(lambda (a b) (- a (* ,i-tint b))) bg-color 
bg-color-tint)))))
               (overlay-put elem-overlay-start 'face `(:background 
,bg-color-blend :extend t))
               (overlay-put elem-overlay-end 'face `(:background 
,bg-color-blend :extend t))
-              (add-to-list 'hl-block-overlay elem-overlay-start)
-              (add-to-list 'hl-block-overlay elem-overlay-end)
+              (push elem-overlay-start hl-block-overlay)
+              (push elem-overlay-end hl-block-overlay)
               (setq start-prev start)
               (setq end-prev end)))
           (cdr block-list))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]