branch: externals/mct
commit db382f904cabda297ea0817e31e49e1f5b96df49
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Tweak how stripes' priority is implemented
    
    For stylistic reasons, following the example of Omar AntolĂ­n Camarena
    over at the Embark repo:
    
<https://github.com/oantolin/embark/commit/07124c7c66c61dd28f55be301573cf30a22a5fac>.
---
 mct.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/mct.el b/mct.el
index 225a067..af244b5 100644
--- a/mct.el
+++ b/mct.el
@@ -356,17 +356,16 @@ Apply APP by first setting up the minibuffer to work with 
Mct."
             (forward-line 1)
           (user-error (goto-char (point-max))))
         (unless (eobp)
-          (let ((pt (point))
-                (overlay))
+          (let ((pt (point)))
             (condition-case nil
                 (forward-line 1)
               (user-error (goto-char (point-max))))
             ;; We set the overlay this way and give it a low priority so
             ;; that `mct--highlight-overlay' and/or the active region
             ;; can override it.
-            (setq overlay (make-overlay pt (point)))
-            (overlay-put overlay 'face 'mct-stripe)
-            (overlay-put overlay 'priority -100)))))))
+            (let ((stripe (make-overlay pt (point))))
+              (overlay-put stripe 'priority -100)
+              (overlay-put stripe 'face 'mct-stripe))))))))
 
 ;;;; Commands and helper functions
 

Reply via email to