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

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

[elpa] externals/greenbar 05e289c 2/5: * packages/greenbar/greenbar.el:


From: Stefan Monnier
Subject: [elpa] externals/greenbar 05e289c 2/5: * packages/greenbar/greenbar.el: Fix copyright line
Date: Tue, 1 Dec 2020 16:04:37 -0500 (EST)

branch: externals/greenbar
commit 05e289c8979b7d388ab1bb5331ee3b0ff8c22f5a
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * packages/greenbar/greenbar.el: Fix copyright line
    
    While at it, remove redundant `:group` arguments.
    (greenbar-color-themes): Remove unneeded use of `eval`.
    (greenbar-mode): Mark as autoloaded.
    Remove the hook function from the part of the hook where it was added.
---
 greenbar.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/greenbar.el b/greenbar.el
index f81cc4a..c29fe2a 100644
--- a/greenbar.el
+++ b/greenbar.el
@@ -1,6 +1,6 @@
 ;;; greenbar.el --- Mark comint output with "greenbar" background -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2013, 2015, 2020  Michael R. Mauger
+;; Copyright (C) 2013-2020  Free Software Foundation, Inc.
 
 ;; Author: Michael R. Mauger <michael@mauger.com>
 ;; Version: 1.0
@@ -66,7 +66,6 @@
 
 (defcustom greenbar-lines-per-bar 3
   "How many lines of output should be colored together."
-  :group 'greenbar
   :type 'integer)
 
 (defvar greenbar-color-themes
@@ -84,8 +83,7 @@
          (let ((x (if (eq (frame-parameter nil 'background-mode) 'dark) "40" 
"f0"))
                (o (if (eq (frame-parameter nil 'background-mode) 'dark) "34" 
"e4")))
 
-           (mapcar (lambda (c)
-                     (eval `(concat "#" ,@c)))
+           (mapcar (lambda (c) (apply #'concat "#" c))
                    `((,x ,x ,o) (,x ,o ,o) (,x ,o ,x) (,o ,o ,x) (,o ,x ,x) 
(,o ,x ,o))))))
   "Greenbar themes.
 
@@ -94,7 +92,6 @@ a symbol that names the theme followed by the list bar 
colors.")
 
 (defcustom greenbar-background-colors 'greenbar
   "List of background colors to be applied to output stripes."
-  :group 'greenbar
   :type `(choice ,@(mapcar (lambda (c)
                              (list 'const (car c)))
                            greenbar-color-themes)
@@ -165,6 +162,7 @@ set of background colors found in
             (greenbar-next-bar))))))
   string)
 
+;;;###autoload
 (define-minor-mode greenbar-mode
   "Enable \"green bar striping\" of comint output"
   nil nil nil
@@ -172,7 +170,7 @@ set of background colors found in
       (add-hook 'comint-output-filter-functions
                 #'greenbar-output-filter t t)
     (remove-hook 'comint-output-filter-functions
-                 #'greenbar-output-filter)))
+                 #'greenbar-output-filter t)))
 
 (provide 'greenbar)
 



reply via email to

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