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

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

[elpa] externals/ergoemacs-mode b16e51c 068/325: Remove unused diminish


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode b16e51c 068/325: Remove unused diminish functions
Date: Sat, 23 Oct 2021 18:48:23 -0400 (EDT)

branch: externals/ergoemacs-mode
commit b16e51c3d18a506bef23ce35cd1b16a055517cea
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>

    Remove unused diminish functions
---
 ergoemacs-component.el | 164 -------------------------------------------------
 ergoemacs-macros.el    |  12 ----
 2 files changed, 176 deletions(-)

diff --git a/ergoemacs-component.el b/ergoemacs-component.el
index 583c3a8..fb89e6e 100644
--- a/ergoemacs-component.el
+++ b/ergoemacs-component.el
@@ -54,9 +54,6 @@
 (defvar ergoemacs-translate--translation-hash)
 (defvar ergoemacs-translation-hash)
 
-(declare-function diminish "diminish")
-(declare-function diminish-undo "diminish")
-
 (declare-function ergoemacs--emacs-state "ergoemacs-mode")
 (declare-function ergoemacs-timing-- "ergoemacs-mode")
 (declare-function ergoemacs-mode--setup-hash-tables--setq "ergoemacs-mode")
@@ -1375,167 +1372,6 @@ Return 0 if there is no such symbol.  Based on
 
 (defalias 'describe-ergoemacs-component 'ergoemacs-component-describe)
 
-(defun ergoemacs-component--diminish-on (plist &optional dim type)
-  "Apply `diminish' to PLIST for theme component.
-
-The :dimininish tag can be of the form:
-
-- t -- Removes the package name (PLIST :package-name) from the
-  minor mode display list.
-
-- minor-mode symbol -- Removes the symbol from the minor mode
-  display list.
-
-- string -- Replace the minor mode symbol with a string.
-
-- (string1 string2) -- Unicode (string1) and terminal (string2)
-  displays.  The display is determined by
-  `ergoemacs-key-description--unicode-char'.
-
-- (minor-mode-symbol) -- Suppress minor mode symbol
-
-- (minor-mode-symbol string) -- Replace minor mode symbol
-  modeline indicator with string
-
-- (minor-mode-symbol string1 string2) -- Replace
-  minor-mode-symbol indicator with unicode (string1) or
-  terminal (string2) indicators.  The display is determined by
-  `ergoemacs-key-description--unicode-char'.
-
-- List of minor mode symbols, or list specifications that include
-  the minor- mode symbol, so that multiple minor modes may be
-   processed by a single :diminish specifciation.
-
-DIM is the replacement for the PLIST :diminish, this is used in
-recursive calls to `ergoemacs-component--diminish-on' to process
-lists.  It can also be the symbol name of the package.
-uu
-When TYPE is non-nil, the function turns off the diminish
-modifications with `diminish-undo'"
-  (require 'diminish nil t)
-  (if (not (featurep 'diminish))
-      (message "Error installing diminish package.")
-    (let ((diminish-symbol (or (plist-get plist :package-name)
-                               (plist-get plist :name)
-                               plist))
-          (dim (or dim (plist-get plist :diminish))))
-      (when (and diminish-symbol (stringp diminish-symbol))
-        (setq diminish-symbol (intern diminish-symbol)))
-
-      (cond
-       ((not dim))
-       ;; :diminish t
-       ((eq t dim)
-        (cond
-         (type (diminish-undo diminish-symbol))
-         ((ignore-errors (and (commandp diminish-symbol t) (not 
(ergoemacs-autoloadp diminish-symbol))
-                              (diminish diminish-symbol)))
-          )
-         (t (eval-after-load diminish-symbol
-              `(diminish ',diminish-symbol)))))
-       ;; :diminish mode
-       ((symbolp dim)
-        (cond
-         (type (diminish-undo dim))
-         ((ignore-errors (and (commandp diminish-symbol t) (not 
(ergoemacs-autoloadp diminish-symbol))
-                              (diminish dim))))
-         (t (eval-after-load diminish-symbol
-              `(diminish ',dim)))))
-
-       ;; :diminish " g"
-       ((stringp dim)
-        (cond
-         (type (diminish-undo diminish-symbol))
-         ((ignore-errors (and (commandp diminish-symbol t) (not 
(ergoemacs-autoloadp diminish-symbol))
-                              (diminish diminish-symbol dim))))
-         (t (eval-after-load diminish-symbol
-              `(diminish ',diminish-symbol ,dim)))))
-       ((and (consp dim)
-             (= 1 (length dim))
-             (symbolp (nth 0 dim)))
-        (cond
-         (type (diminish-undo (nth 0 dim)))
-         ((ignore-errors (and (commandp (nth 0 dim) t) (not 
(ergoemacs-autoloadp (nth 0 dim)))
-                              (diminish (nth 0 dim) dim))))
-         (t (eval-after-load diminish-symbol
-              `(diminish ',(nth 0 dim))))))
-       
-       ;; :diminish (" " " g")
-       ((and (consp dim)
-             (= 2 (length dim))
-             (stringp (nth 0 dim))
-             (stringp (nth 1 dim)))
-        (cond
-         (type (diminish-undo diminish-symbol))
-         ((ignore-errors (and (commandp diminish-symbol t) (not 
(ergoemacs-autoloadp diminish-symbol))
-                              (diminish diminish-symbol (ergoemacs :unicode 
(nth 0 dim) (nth 1 dim))))))
-         (t (eval-after-load diminish-symbol
-              `(ignore-errors
-                 (diminish ',diminish-symbol
-                           ,(ergoemacs :unicode (nth 0 dim) (nth 1 dim))))))))
-       ;;:diminish (" 🌈" " ⓡ" " r")
-       ((and (consp dim)
-             (= 3 (length dim))
-             (stringp (nth 0 dim))
-             (stringp (nth 1 dim))
-             (stringp (nth 3 dim)))
-        (cond
-         (type (diminish-undo diminish-symbol))
-         ((ignore-errors (and (commandp diminish-symbol t) (not 
(ergoemacs-autoloadp diminish-symbol))
-                              (diminish diminish-symbol (ergoemacs :unicode 
(nth 0 dim) (ergoemacs :unicode (nth 1 dim) (nth 2 dim)))))))
-         (t (eval-after-load diminish-symbol
-              `(ignore-errors
-                 (diminish ',diminish-symbol
-                           ,(ergoemacs :unicode (nth 0 dim) (ergoemacs 
:unicode (nth 1 dim) (nth 2 dim)))))))))
-       ;; :diminish (mode " " " g")
-       ((and (consp dim)
-             (= 3 (length dim))
-             (symbolp (nth 0 dim))
-             (stringp (nth 1 dim))
-             (stringp (nth 2 dim)))
-        (cond
-         (type (diminish-undo (nth 0 dim)))
-         ((ignore-errors (and (commandp (nth 0 dim) t) (not 
(ergoemacs-autoloadp (nth 0 dim)))
-                              (diminish (nth 0 dim) (ergoemacs :unicode (nth 1 
dim) (nth 2 dim))))))
-         (t (eval-after-load diminish-symbol
-              `(ignore-errors
-                 (diminish ',(nth 0 dim)
-                           ,(ergoemacs :unicode (nth 1 dim) (nth 2 dim))))))))
-       ;; :diminish (rainbow-mode " 🌈" " ⓡ" " r")
-       ((and (consp dim)
-             (= 4 (length dim))
-             (symbolp (nth 0 dim))
-             (stringp (nth 1 dim))
-             (stringp (nth 2 dim))
-             (stringp (nth 3 dim)))
-        (cond
-         (type (diminish-undo (nth 0 dim)))
-         ((ignore-errors (and (commandp (nth 0 dim) t) (not 
(ergoemacs-autoloadp (nth 0 dim)))
-                              (diminish (nth 0 dim) (ergoemacs :unicode (nth 1 
dim) (ergoemacs :unicode (nth 2 dim) (nth 3 dim)))))))
-         (t (eval-after-load diminish-symbol
-              `(ignore-errors
-                 (diminish ',(nth 0 dim)
-                           ,(ergoemacs :unicode (nth 1 dim) (ergoemacs 
:unicode (nth 2 dim) (nth 3 dim)))))))))
-       ;; :diminish (mode " ")
-       ((and (consp dim)
-             (= 2 (length dim))
-             (symbolp (nth 0 dim))
-             (stringp (nth 1 dim)))
-        (cond
-         (type (diminish-undo (nth 0 dim)))
-         ((ignore-errors (and (commandp (nth 0 dim) t) (not 
(ergoemacs-autoloadp (nth 0 dim)))
-                              (diminish (nth 0 dim) (nth 1 dim)))))
-         (t (eval-after-load diminish-symbol
-              `(diminish ',(nth 0 dim) ,(nth 1 dim))))))
-       ((consp dim)
-        (dolist (elt dim)
-          (ergoemacs-component--diminish-on plist elt type)))))))
-
-(defun ergoemacs-component--diminish-off (plist)
-  "Remove `diminish' top PLIST for theme component.
-Wrapper for `ergoemacs-component--diminish-on'."
-  (ergoemacs-component--diminish-on plist nil t))
-
 (provide 'ergoemacs-component)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; ergoemacs-component.el ends here
diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index ee8c41a..3d320ba 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -255,7 +255,6 @@ macro."
     :interpreter
     :defer
     :demand
-    :diminish
     :package-name
     :ergoemacs-require
     :no-load
@@ -337,17 +336,6 @@ This accepts the following keywords:
 
 :demand -- Prevent deferred loading in all cases
 
-:diminish -- Diminish this mode.  It can be of the following forms:
-
-    :diminish t -- Assumes that :package-name is diminshed
-    :diminish package-name -- Diminshes package-name
-    :diminish (package-name \" New Description\")
-    :diminish (package-name \" unicode\" \" str\")
-
-    For more information, see `ergoemacs-component--diminish-on'.
-
-    By default this is nil.
-
 Borrowed from `use-package'.
 
 :package-name -- Name of package to load.  When non-nil any key



reply via email to

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