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

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

[elpa] externals/ergoemacs-mode 87a332c 073/325: Merge branch 'master' i


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode 87a332c 073/325: Merge branch 'master' into HEAD
Date: Sat, 23 Oct 2021 18:48:24 -0400 (EDT)

branch: externals/ergoemacs-mode
commit 87a332cffb4d885e00216f3a014634fa1dc088dd
Merge: 6868238 acf3dfe
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>

    Merge branch 'master' into HEAD
---
 ergoemacs-advice.el         |   6 -
 ergoemacs-command-loop.el   |  58 -------
 ergoemacs-component.el      | 376 --------------------------------------------
 ergoemacs-macros.el         |  12 --
 ergoemacs-map-properties.el |   3 -
 ergoemacs-mode.el           |  72 ++-------
 ergoemacs-test.el           |  47 ------
 ergoemacs-themes.el         |   2 +
 8 files changed, 14 insertions(+), 562 deletions(-)

diff --git a/ergoemacs-advice.el b/ergoemacs-advice.el
index 7cfd3ad..b78091c 100644
--- a/ergoemacs-advice.el
+++ b/ergoemacs-advice.el
@@ -358,12 +358,6 @@ TYPE is the type of translation installed."
       ad-do-it
     (ergoemacs-mode--undefined-advice)))
 
-(ergoemacs-advice handle-shift-selection ()
-  "Allow `ergoemacs-mode' to do shift selection on keys like Alt+# to Alt+3."
-  :type :before
-  (when (eq 'ergoemacs-command-loop--shift-translate (key-binding 
(this-single-command-keys)))
-    (setq this-command-keys-shift-translated t)))
-
 (provide 'ergoemacs-advice)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; ergoemacs-advice.el ends here
diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index abde7ec..4e91b05 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -1558,28 +1558,6 @@ They don't exactly behave like their Emacs equivalents."
   (or (and ergoemacs-mode ergoemacs-command-loop--single-command-keys)
       (funcall ergoemacs-command-loop--this-command-keys)))
 
-(defvar ergoemacs-command-loop--timer nil
-  "Timer to startup `ergoemacs-mode' command loop.")
-(defun ergoemacs-command-loop--timer ()
-  "Start `ergoemacs-command-loop--internal' if not currently running."
-  (unless (and (ergoemacs-command-loop-full-p)
-               (ergoemacs-command-loop-p))
-    (ergoemacs-command-loop--internal)))
-
-(defun ergoemacs-command-loop--install-timer ()
-  "Install the `ergoemacs-command-loop--timer'."
-  (setq ergoemacs-command-loop--timer
-        (run-with-timer 0.0 nil #'ergoemacs-command-loop--timer)))
-
-(defun ergoemacs-command-loop--remove-timer ()
-  "Remove `ergoemacs-command-loop--timer'."
-  (when ergoemacs-command-loop--timer
-    (cancel-timer ergoemacs-command-loop--timer)
-    (setq ergoemacs-command-loop--timer nil)))
-
-(add-hook 'ergoemacs-mode-startup-hook #'ergoemacs-command-loop--install-timer)
-(add-hook 'ergoemacs-mode-shutdown-hook #'ergoemacs-command-loop--remove-timer)
-
 (defun ergoemacs-command-loop--ignore (&rest _ignore)
   "Do nothing and return nil.
 
@@ -1631,7 +1609,6 @@ Also in the loop, `universal-argument-num-events' is set 
to
 Emacs versions)."
   (interactive)
   (when ergoemacs-mode
-    (ergoemacs-command-loop--execute-rm-keyfreq 'ergoemacs-command-loop)
     ;; Call the startup command
     (when (commandp ergoemacs-command-loop-start)
       (ergoemacs-command-loop--call-interactively ergoemacs-command-loop-start)
@@ -2061,35 +2038,6 @@ pressed the translated key by changing
               (throw 'found-command ret))))))
     ret)))
 
-(defun ergoemacs-command-loop--execute-handle-shift-selection (function)
-  "Allow `ergoemacs-mode' command loop to handle shift selection.
-
-This will apply `handle-shift-selection' when FUNCTION is
-considered a shift-selection compatible function.
-
-This allows shift-selection of non-letter keys.
-For instance in QWERTY M-> is shift translated to M-."
-  (when (ergoemacs :movement-p function)
-    (handle-shift-selection)))
-
-(defun ergoemacs-command-loop--execute-rm-keyfreq (command)
-  "Remove COMMAND from `keyfreq-mode' counts."
-  (when (featurep 'keyfreq)
-    (when keyfreq-mode
-      (let (count)
-        (setq count (ergoemacs-gethash (cons major-mode command) 
keyfreq-table))
-        (cond
-         ((not count))
-         ((= count 1)
-          (remhash (cons major-mode command) keyfreq-table))
-         (count
-          (puthash (cons major-mode command) (- count 1)
-                   keyfreq-table)))
-        ;; Add local-fn to counter.
-        (setq count (ergoemacs-gethash (cons major-mode command) 
keyfreq-table))
-        (puthash (cons major-mode command) (if count (+ count 1) 1)
-                 keyfreq-table)))))
-
 ;; (3) execute command
 (defun ergoemacs-command-loop--execute (command &optional keys)
   "Execute COMMAND pretending that KEYS were pressed."
@@ -2113,10 +2061,6 @@ For instance in QWERTY M-> is shift translated to M-."
          (t
           ;; This should be a regular command.
           
-          ;; Remove counting of `this-command' in `keyfreq-mode'
-          ;; Shouldn't be needed any more...
-          ;; (ergoemacs-command-loop--execute-rm-keyfreq this-command)
-          
           ;; This command execute should modify the following variables:
           ;; - `last-repeatable-command'
           ;; - `this-command'
@@ -2129,8 +2073,6 @@ For instance in QWERTY M-> is shift translated to M-."
 
          (ergoemacs-command-loop--execute-modify-command-list command)
           
-          ;; Handle Shift Selection
-          (ergoemacs-command-loop--execute-handle-shift-selection this-command)
           (when keys
             (setq ergoemacs-command-loop--single-command-keys keys)
             
diff --git a/ergoemacs-component.el b/ergoemacs-component.el
index 6519dfd..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")
@@ -985,218 +982,6 @@ OBJECT is the `ergoemacs-component-struct' object being 
changed."
      (t (ergoemacs-component-struct--variables 
(ergoemacs-component-struct--lookup-hash obj))))))
 
 (defvar ergoemacs-component-struct--refresh-variables nil)
-(defvar ergoemacs-component-struct--applied-inits '())
-(defvar ergoemacs-component-struct--deferred-functions '())
-
-(defvar ergoemacs-component-struct--apply-inits-first-p t)
-(defvar ergoemacs-component-struct--applied-plists nil)
-
-(defvar ergoemacs-component-echo-loaded-file-p nil)
-
-(defvar ergoemacs-component-struct--apply-inits nil)
-(defun ergoemacs-component-struct--apply-inits (&optional file obj)
-  "Apply the initializations after loading FILE from the object OBJ.
-
-This is a wrapper for `ergoemacs-component-struct--apply-inits--'
-to prevent infinite recursion."
-  (unless ergoemacs-component-struct--apply-inits
-    (setq ergoemacs-component-struct--apply-inits t)
-    (unwind-protect
-       (ergoemacs-component-struct--apply-inits-- file obj))
-    (setq ergoemacs-component-struct--apply-inits nil)))
-
-(defun ergoemacs-component-struct--apply-inits-- (&optional file obj)
-  "Apply the initializations after loading FILE from the object OBJ."
-  (ergoemacs-map-properties--label-known)
-  (when (and ergoemacs-component-echo-loaded-file-p file)
-    (message "`ergoemacs-mode' Loaded %s" file))
-  (when (eq ergoemacs-component-struct--refresh-variables t)
-    (setq ergoemacs-component-struct--refresh-variables 
ergoemacs-component-struct--applied-inits))
-  (let* ((obj (or obj (ergoemacs-theme-components)))
-         tmp)
-    (when ergoemacs-component-struct--apply-inits-first-p
-      (setq ergoemacs-component-struct--apply-inits-first-p nil)
-      (if (not ergoemacs-mode--fast-p)
-          (setq ergoemacs--start-emacs-state-2 (ergoemacs--emacs-state))
-        ;; Check to see if emacs state has changed.
-        (setq ergoemacs--start-emacs-state-2 (ergoemacs--emacs-state))
-        (ergoemacs-mode--setup-hash-tables--setq
-         nil
-         'ergoemacs--last-start-emacs-state-2 nil)
-        (unless (equal ergoemacs--last-start-emacs-state-2 
ergoemacs--start-emacs-state-2)
-          (if (not ergoemacs--last-start-emacs-state-2)
-              (progn
-                (message "Saving fast startup state.")
-                (setq ergoemacs--last-start-emacs-state-2 
ergoemacs--start-emacs-state-2)
-                (ergoemacs-mode--setup-hash-tables--setq
-                 t
-                 'ergoemacs--last-start-emacs-state-2 
ergoemacs--last-start-emacs-state-2))
-            (ergoemacs-mode-clear-cache t)
-            (ergoemacs-warn "ergoemacs-mode cache reset AFTER loading; Keys 
may be slightly inconsistent until emacs restart.")))))
-    ;; Turn on plist options (like :diminish)
-    (dolist (elt obj)
-      (unless (memq elt ergoemacs-component-struct--applied-plists)
-        (let* ((comp (ergoemacs-component-struct--lookup-hash elt))
-               (plist (ergoemacs-component-struct-plist comp))
-               fn)
-          (dolist (elt plist)
-            (when (and (symbolp elt)
-                       (setq fn (intern (format "ergoemacs-component--%s-on"
-                                                (substring (symbol-name elt) 
1))))
-                       (fboundp fn))
-              (funcall fn plist)))
-          (push elt ergoemacs-component-struct--applied-plists))))
-    
-    ;; Turn off plist options
-    (setq tmp nil)
-    (dolist (elt ergoemacs-component-struct--applied-plists)
-      (if (memq elt obj)
-          (push elt tmp)
-        (let* ((comp (ergoemacs-component-struct--lookup-hash elt))
-               (plist (ergoemacs-component-struct-plist comp))
-               fn)
-          (dolist (elt plist)
-            (when (and (symbolp elt)
-                       (setq fn (intern (format "ergoemacs-component--%s-off"
-                                                (substring (symbol-name elt) 
1))))
-                       (fboundp fn))
-              (funcall fn plist))))))
-    (setq ergoemacs-component-struct--applied-plists tmp)
-    (dolist (cur-obj obj)
-      (ergoemacs-timing (intern (format "initialize-%s" cur-obj))
-        (dolist (init (ergoemacs-component-struct--variables cur-obj))
-          (if (and (consp (nth 0 init)) (not (nth 1 init)) (not (nth 2 init)))
-              (unless (member (nth 0 init) 
ergoemacs-component-struct--deferred-functions)
-                (cond
-                 ((eq (car (nth 0 init)) 'add-to-list)
-                  (when (ignore-errors (boundp (nth 1 (nth 0 init))))
-                    (ignore-errors
-                      (apply (car (nth 0 init)) (cdr (nth 0 init)))
-                      (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions)))
-                  (when (ignore-errors (eq 'quote (nth 0 (nth 1 (nth 0 
init)))))
-                    (if (ignore-errors (eq 'quote (nth 0 (nth 2 (nth 0 
init)))))
-                        (when (ignore-errors (boundp (nth 1 (nth 1 (nth 0 
init)))))
-                          (apply 'add-to-list  (nth 1 (nth 2 (nth 0 init))) 
(cdr (cdr (cdr (nth 0 init)))))
-                          (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions))
-                      (when (ignore-errors (boundp (nth 1 (nth 1 (nth 0 
init)))))
-                        (apply 'add-to-list (nth 1 (nth 1 (nth 0 init))) (cdr 
(cdr (nth 0 init))))
-                        (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions)))))
-                 ((memq (car (nth 0 init)) '(push cl-pushnew))
-                  (when (ignore-errors (boundp (nth 2 (nth 0 init))))
-                    (if (ignore-errors (eq 'quote (nth 1 (nth 1 (nth 0 
init)))))
-                        (ignore-errors
-                          (apply (car (nth 0 init)) (nth 1 (nth 1 (nth 0 
init))) (cdr (cdr (nth 0 init))))
-                          (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions))
-                      (ignore-errors
-                        (apply (car (nth 0 init)) (cdr (nth 0 init)))
-                        (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions)))
-                    (ignore-errors
-                      (apply (car (nth 0 init)) (cdr (nth 0 init)))
-                      (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions))))
-                 ((eq (car (nth 0 init)) 'require)
-                  (require (nth 1 (nth 1 (nth 0 init))) nil t)
-                  (when (not (featurep (nth 1 (nth 1 (nth 0 init)))))
-                    ;; Attempt to ensure the feature, if specified.
-                    (ergoemacs-warn "Could not load %s; %s" (nth 1 (nth 1 (nth 
0 init)))
-                          (nth 3 init))))
-                 (t
-                  (condition-case err
-                      (eval (nth 0 init))
-                    (error (progn
-                            (ergoemacs-warn "%s while evaluating %s" err (nth 
0 init))
-                            (debug err))))
-                  (push (nth 0 init) 
ergoemacs-component-struct--deferred-functions))
-                 ;; (t (ergoemacs-warn "Theme did not handle: %s" (nth 0 
init)))
-                 ))
-            (let ((x (and ergoemacs-component-struct--refresh-variables 
(boundp (nth 0 init))
-                          (assq (nth 0 init) 
ergoemacs-component-struct--refresh-variables)))
-                  add-hook-p append-p local-p)
-              (cond
-               ((and x
-                     (not (nth 2 init))
-                     (not
-                      (equal (ergoemacs-sv (nth 0 init))
-                             (funcall (nth 1 init)))))
-                ;; Values have changed, so reapply.
-                (setq ergoemacs-component-struct--refresh-variables (delq x 
ergoemacs-component-struct--refresh-variables)
-                      x nil))
-               ((and x (nth 2 init))
-                ;; Reapply hooks
-                (setq ergoemacs-component-struct--refresh-variables (delq x 
ergoemacs-component-struct--refresh-variables)
-                      x nil)))
-              (cond
-               (x ;; Values have not changed
-                (setq ergoemacs-component-struct--refresh-variables (delq x 
ergoemacs-component-struct--refresh-variables)))
-               ((not (boundp (nth 0 init))) ;; Do nothing, not bound yet.
-                )
-               ((and (nth 2 init) ;; Already applied hook?
-                     (setq add-hook-p (nth 0 (nth 2 init))
-                           append-p (nth 1 (nth 2 init))
-                           local-p (nth 2 (nth 2 init)))
-                     (member (list (nth 0 init) (nth 1 init)
-                                   (list (not add-hook-p) append-p local-p))
-                             ergoemacs-component-struct--applied-inits)))
-               ((nth 2 init)
-                ;; Hook
-                (if add-hook-p
-                    (progn
-                      (funcall 'add-hook (nth 0 init) (nth 1 init) append-p 
local-p)
-                      ;; (message "%s: (add-hook %s %s %s %s)"
-                      ;;          cur-obj (nth 0 init) (nth 1 init)
-                      ;;          append-p local-p)
-                      )
-                  (funcall 'remove-hook (nth 0 init) (nth 1 init) local-p)
-                  ;; (message "%s: (remove-hook %s %s %s %s)"
-                  ;;          cur-obj (nth 0 init) (nth 1 init)
-                  ;;          append-p local-p)
-                  )
-                (push (list (nth 0 init) (nth 1 init)
-                            (list (not add-hook-p) append-p local-p))
-                      ergoemacs-component-struct--applied-inits))
-               ((and (not (nth 2 init)) (assq (nth 0 init) 
ergoemacs-component-struct--applied-inits))
-                ;; Already applied, Do nothing for now.
-                )
-               (t
-                ;; (Nth 0 Init)iable state change
-                (when (ergoemacs-set (nth 0 init) (funcall (nth 1 init))
-                                     (ergoemacs-component-struct-defer 
(ergoemacs-component-struct--lookup-hash cur-obj)))
-                  (push (list (nth 0 init) (ergoemacs-sv (nth 0 init)))
-                        ergoemacs-component-struct--applied-inits)
-                  )))))))))
-  ;; Now remove things that were not set
-  (when ergoemacs-component-struct--refresh-variables
-    (let ((tmp ergoemacs-component-struct--applied-inits))
-      (setq ergoemacs-component-struct--applied-inits 
ergoemacs-component-struct--refresh-variables)
-      (setq ergoemacs-component-struct--refresh-variables nil)
-      (unwind-protect
-          (ergoemacs-component-struct--remove-inits)
-        (setq ergoemacs-component-struct--applied-inits tmp)))))
-
-(add-hook 'ergoemacs-mode-startup-hook 
#'ergoemacs-component-struct--apply-inits)
-(add-hook 'ergoemacs-after-load-functions 
#'ergoemacs-component-struct--apply-inits)
-
-(defun ergoemacs-component-struct--remove-inits ()
-  "Remove the applied initializations of modes and variables.
-This assumes the variables are stored in 
`ergoemacs-component-struct--applied-inits'"
-  (if ergoemacs-component-struct--refresh-variables
-      (setq ergoemacs-component-struct--refresh-variables 
ergoemacs-component-struct--applied-inits)
-    (dolist (init ergoemacs-component-struct--applied-inits)
-      (let ((var (nth 0 init))
-            ;; (val (nth 1 init))
-            (hook (nth 2 init)))
-        (cond
-         (hook
-          (let ((add-hook-p (nth 0 hook))
-                (append-p (nth 1 hook))
-                (local-p (nth 2 hook)))
-            (if add-hook-p
-                (funcall 'add-hook (nth 0 init) (nth 1 init) append-p local-p)
-              (funcall 'remove-hook (nth 0 init) (nth 1 init) local-p))))
-         (t
-          (ergoemacs-reset var))))))
-  (setq ergoemacs-component-struct--applied-inits '()))
-
-(add-hook 'ergoemacs-mode-shutdown-hook 
#'ergoemacs-component-struct--remove-inits)
 
 (defun ergoemacs-component-struct--versions (&optional obj)
   "Get Versions available for OBJ.
@@ -1587,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
diff --git a/ergoemacs-map-properties.el b/ergoemacs-map-properties.el
index c5fe061..2fad276 100644
--- a/ergoemacs-map-properties.el
+++ b/ergoemacs-map-properties.el
@@ -635,14 +635,11 @@ These keymaps are saved in 
`ergoemacs-map-properties--hook-map-hash'."
       (progn
        (setq ergoemacs-map-properties--known-maps 
ergoemacs-map-properties--label-atoms-maps)
        (ergoemacs-map-properties--label-known))
-      ;; (ergoemacs-map-properties--label-atoms)
     (ergoemacs-timing get-original-global-map
-      ;; (ergoemacs-map-properties--label-atoms)
       (if (file-readable-p (ergoemacs-map-properties--default-global-file))
           (progn
            (load (ergoemacs-map-properties--default-global-file))
            (setq ergoemacs-map-properties--known-maps 
ergoemacs-map-properties--label-atoms-maps)
-           (message "Breadcrumb %s" (ergoemacs-gethash 
'describe-european-environment-map ergoemacs-breadcrumb-hash))
            (ergoemacs-map-properties--label-known)
             (ergoemacs-map-properties--protect-global-map))
         (if noninteractive
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 210a0be..ea98246 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -72,7 +72,6 @@
 (declare-function ergoemacs-layouts--custom-documentation "ergoemacs-layouts")
 
 (declare-function ergoemacs-map-keymap "ergoemacs-mapkeymap")
-;; (declare-function ergoemacs-map-properties--create-label-function 
"ergoemacs-map-properties")
 (declare-function ergoemacs-map-properties--put "ergoemacs-map-properties")
 
 (declare-function ergoemacs-theme--custom-documentation 
"ergoemacs-theme-engine")
@@ -95,11 +94,6 @@
 ;; Fundamental ergoemacs functions
 
 
-;; (unless (featurep 'ergoemacs-map)
-;;   (load "ergoemacs-map"))
-
-
-
 ;; Ergoemacs-keybindings version
 (defconst ergoemacs-mode-version "5.14.7.3"
   "Ergoemacs-keybindings minor mode version number.")
@@ -280,7 +274,8 @@ The `execute-extended-command' is now 
\\[execute-extended-command].
   :global t
   :group 'ergoemacs-mode
   :keymap ergoemacs-menu-keymap
-  :after-hook (if (and (not noninteractive)
+  (setq ergoemacs-mode--start-p t)
+  (if (and (not noninteractive)
                        (not ergoemacs-mode--start-p))
                   (if ergoemacs-mode
                       (message "Ergoemacs will be started.")
@@ -301,12 +296,15 @@ The `execute-extended-command' is now 
\\[execute-extended-command].
                         (add-hook 'pre-command-hook 
#'ergoemacs-pre-command-hook)
                         (add-hook 'post-command-hook 
#'ergoemacs-post-command-hook)
                         (add-hook 'after-load-functions 
#'ergoemacs-after-load-functions)
+                        (add-hook 'after-load-functions 
#'ergoemacs-mode-after-startup-run-load-hooks)
+
                         (setq ergoemacs-require--ini-p t)
                        (ergoemacs-setup-override-keymap)                       
                         (if refresh-p
                             (message "Ergoemacs-mode keys refreshed (%s:%s)"
                                      ergoemacs-keyboard-layout (or 
ergoemacs-theme "standard"))
                           (message "Ergoemacs-mode turned ON (%s:%s)." 
ergoemacs-keyboard-layout (or ergoemacs-theme "standard"))))
+
                     (modify-all-frames-parameters 
ergoemacs-mode--default-frame-alist)
                     (unless (assoc 'cursor-type 
ergoemacs-mode--default-frame-alist)
                       (modify-all-frames-parameters (list (cons 'cursor-type 
'box))))
@@ -316,7 +314,13 @@ The `execute-extended-command' is now 
\\[execute-extended-command].
                     (remove-hook 'pre-command-hook 
#'ergoemacs-pre-command-hook)
                     (remove-hook 'after-load-functions 
#'ergoemacs-after-load-functions)
                     (unless refresh-p
-                      (message "Ergoemacs-mode turned OFF."))))))
+                      (message "Ergoemacs-mode turned OFF.")
+                      )
+                    )
+                  )
+                (setq ergoemacs-mode-started-p t)
+                )
+  )
 
 (defvar ergoemacs--gzip (executable-find "gzip")
   "Gzip location.")
@@ -424,7 +428,6 @@ This is structured by valid keyboard layouts for
     (calculate-ergoemacs-remap . "ergoemacs-map.el")
     (calc-remaps . "ergoemacs-map.el")
     (calc-passthrough . "ergoemacs-map.el")
-    (ergoemacs-mode-after-init-emacs . "ergoemacs-mode.el")
     (setup-ergoemacs-hash . "ergoemacs-mode.el"))
   "Alist of known timing functions.")
 
@@ -533,15 +536,9 @@ When STORE-P is non-nil, save the tables."
      'ergoemacs-translate--hash (make-hash-table)
      'ergoemacs-translation-hash (make-hash-table)
      'ergoemacs-breadcrumb-hash (make-hash-table)
-     ;; 'ergoemacs-map-properties--create-label-function nil
      'ergoemacs-map-properties--get-or-generate-map-key most-negative-fixnum
      'ergoemacs-map-properties--before-ergoemacs nil
      'ergoemacs-map-properties--label-atoms-maps nil
-     ;;'ergoemacs-map-- (make-hash-table :test 'equal))
-     ;;'ergoemacs-map--alist (make-hash-table)
-     ;;'ergoemacs-map--alists (make-hash-table)
-     ;;'ergoemacs-map-properties--user-map-hash (make-hash-table :test 'equal)
-     ;;'ergoemacs-translate--keymap-hash (make-hash-table)
      )
     (when (and store-p (featurep 'persistent-soft))
       (persistent-soft-flush (ergoemacs-mode--pcache-repository))
@@ -567,7 +564,6 @@ When STORE-P is non-nil, save the tables."
 (dolist (pkg '(ergoemacs-command-loop
                ergoemacs-advice
                ergoemacs-component
-               ergoemacs-debug
                ergoemacs-functions
                ergoemacs-key-description
                ergoemacs-layouts
@@ -699,9 +695,6 @@ SYMBOL is the symbol to set, NEW-VALUE is it's value."
   "Remove `ergoemacs-mode' overriding keymap `ergoemacs-override-keymap'."
   (remove-hook 'emulation-mode-map-alists 'ergoemacs-override-alist))
 
-;; (add-hook 'ergoemacs-mode-startup-hook 'ergoemacs-setup-override-keymap)
-;; (add-hook 'ergoemacs-mode-shudown-hook 'ergoemacs-setup-override-keymap)
-
 
 ;;; Frequently used commands as aliases
 (defcustom ergoemacs-use-aliases t
@@ -817,7 +810,6 @@ Valid values are:
   "Display Options for `ergoemacs-mode'."
   :group 'ergoemacs-mode)
 
-(define-obsolete-variable-alias 'ergoemacs-use-unicode-char 
'ergoemacs-display-unicode-characters)
 (defcustom ergoemacs-display-unicode-characters t
   "Use unicode characters when available."
   :type 'boolean
@@ -825,7 +817,6 @@ Valid values are:
   :initialize #'custom-initialize-default
   :group 'ergoemacs-display)
 
-(define-obsolete-variable-alias 'ergoemacs-use-ergoemacs-key-descriptions 
'ergoemacs-display-ergoemacs-key-descriptions)
 (defcustom ergoemacs-display-ergoemacs-key-descriptions t
   "Use ergoemacs key descriptions (Alt+)."
   :type 'boolean
@@ -834,7 +825,6 @@ Valid values are:
   :group 'ergoemacs-display)
 
 
-(define-obsolete-variable-alias 'ergoemacs-use-unicode-brackets 
'ergoemacs-display-use-unicode-brackets-around-keys)
 (defcustom ergoemacs-display-use-unicode-brackets-around-keys t
   "Use unicode brackets."
   :type 'boolean
@@ -842,7 +832,6 @@ Valid values are:
   :initialize #'custom-initialize-default
   :group 'ergoemacs-display)
 
-(define-obsolete-variable-alias 'ergoemacs-use-small-symbols 
'ergoemacs-display-small-symbols-for-key-modifiers)
 (defcustom ergoemacs-display-small-symbols-for-key-modifiers nil
   "Use small symbols to represent alt+ ctl+ on windows/linux."
   :type 'boolean
@@ -850,7 +839,6 @@ Valid values are:
   :initialize #'custom-initialize-default
   :group 'ergoemacs-display)
 
-(define-obsolete-variable-alias 'ergoemacs-capitalize-keys 
'ergoemacs-display-capitalize-keys)
 (defcustom ergoemacs-display-capitalize-keys 'with-modifiers
   "Capitalize keys like Ctrl+C.
 `ergoemacs-mode' should show Ctrl+Shift+C if you are pressing these keys."
@@ -862,7 +850,6 @@ Valid values are:
   :initialize #'custom-initialize-default
   :group 'ergoemacs-display)
 
-(define-obsolete-variable-alias 'ergoemacs-pretty-key-use-face 
'ergoemacs-display-key-use-face-p)
 (defcustom ergoemacs-display-key-use-face-p t
   "Use a button face for keys."
   :type 'boolean
@@ -917,8 +904,6 @@ Valid values are:
   "Options for `ergoemacs-command-loop'."
   :group 'ergoemacs-mode)
 
-(define-obsolete-variable-alias 'ergoemacs-read-blink 
'ergoemacs-command-loop-blink-character)
-
 (defcustom ergoemacs-command-loop-blink-character (ergoemacs :unicode-or-alt 
"โ€ข" "ยท" "-")
   "Blink character."
   :type '(choice
@@ -926,13 +911,11 @@ Valid values are:
           (const :tag "No cursor" nil))
   :group 'ergoemacs-command-loop)
 
-(define-obsolete-variable-alias 'ergoemacs-read-blink-timeout 
'ergoemacs-command-loop-blink-rate)
 (defcustom ergoemacs-command-loop-blink-rate 0.4
   "Rate that the ergoemacs-command loop cursor blinks."
   :type 'number
   :group 'ergoemacs-command-loop)
 
-(define-obsolete-variable-alias 'ergoemacs-read-swaps 
'ergoemacs-command-loop-swap-translation)
 (defcustom ergoemacs-command-loop-swap-translation
   '(((:normal :normal) :unchorded-ctl)
     ((:normal :unchorded-ctl) :ctl-to-alt)
@@ -984,7 +967,6 @@ Valid values are:
   :group 'ergoemacs-command-loop)
 
 
-(define-obsolete-variable-alias 'ergoemacs-default-cursor 
'ergoemacs-default-cursor-color)
 (defcustom ergoemacs-default-cursor-color nil
   "Default cursor color.
 
@@ -1025,38 +1007,11 @@ also perform `outline-next-visible-heading'"
   :type 'boolean
   :group 'ergoemacs-mode)
 
-
-;; (define-obsolete-face-alias 'ergoemacs-key-description-kbd 
'ergoemacs-display-key-face "")
-
-;;; Options not supported now
-
-;; (defcustom ergoemacs-change-fixed-layout-to-variable-layout nil
-;;   "Change the fixed layout to variable layout keys.
-;; For example, on dvorak, change C-j to C-c (copy/command)."
-;;   :type 'boolean
-;;   :set 'ergoemacs-set-default
-;;   :initialize #'custom-initialize-default
-;;   :group 'ergoemacs-mode)
-
 (defun ergoemacs-mode-after-startup-run-load-hooks (&rest _ignore)
   "Run `ergoemacs-mode-after-load-hook' after loading Emacs."
   (run-hooks 'ergoemacs-mode-after-load-hook))
 
 (defvar ergoemacs-mode-started-p nil)
-(defun ergoemacs-mode-after-init-emacs ()
-  "Start `ergoemacs-mode' after loading Emacs."
-  (unless ergoemacs-mode--start-p
-    (ergoemacs-timing ergoemacs-mode-after-init-emacs
-      (setq ergoemacs-mode--start-p t)
-      (ergoemacs-mode ergoemacs-mode)
-      (run-hooks 'ergoemacs-mode-init-hook)
-      (add-hook 'after-load-functions 
#'ergoemacs-mode-after-startup-run-load-hooks))
-    (let* ((time1 ergoemacs--load-time)
-           (time2 (aref (gethash 'ergoemacs-mode-after-init-emacs 
ergoemacs-timing-hash) 1))
-           (time3 (+ time1 time2)))
-      (message "Started `ergoemacs-mode'. Total startup time %f (Load: %f, 
Initialize:%f%s)"
-               time3 time1 time2 (or (and ergoemacs-mode--fast-p ", cached") 
""))))
-  (setq ergoemacs-mode-started-p t))
 
 (if ergoemacs-mode--fast-p
     (provide 'ergoemacs-themes)
@@ -1074,9 +1029,6 @@ also perform `outline-next-visible-heading'"
 (puthash 'ergoemacs-load-time (vector 1 ergoemacs--load-time 
ergoemacs--load-time ergoemacs--load-time (or load-file-name buffer-file-name))
          ergoemacs-timing-hash)
 
-(run-with-timer 0.0 nil #'ergoemacs-mode-after-init-emacs)
-(add-hook 'emacs-startup-hook #'ergoemacs-mode-after-init-emacs)
-
 (provide 'ergoemacs-mode)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; ergoemacs-mode.el ends here
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index 08addb5..061aa42 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -1153,53 +1153,6 @@ Should test issue #142"
     (when (file-exists-p w-file)
       (delete-file w-file))))
 
-(ert-deftest ergoemacs-test-ergoemacs-theme-component-351 ()
-  "Test `ergoemacs-theme-compenent' before load"
-  :tags '(:slow)
-  (let* ((emacs-exe (ergoemacs-emacs-exe))
-         (w-file (expand-file-name "global-test" ergoemacs-dir))
-         (temp-file (make-temp-file "ergoemacs-test" nil ".el")))
-    (with-temp-file temp-file
-      (insert "(eval-when-compile (require 'ergoemacs-macros) (require 
'cl-lib))"
-              (or (and (boundp 'wait-for-me)
-                       "(setq debug-on-error t debug-on-quit t)") "")
-              "(ergoemacs-theme-component my-theme01 ()\n"
-              "\"My ergoemacs-mode theme component\"\n"
-              "(global-set-key (kbd \"C-x 1\") 'delete-other-windows)\n"
-              "(global-set-key (kbd \"C-x 2\") 'split-window-vertically)\n"
-              "(global-set-key (kbd \"C-x 3\") 'split-window-horizontally)\n"
-              ";; more code ... \n"
-              "(global-set-key '[f2] 'save-buffer)\n)\n"
-              "(add-hook 'ergoemacs-mode-hook\n"
-              "(lambda ()\n"
-              "  (ergoemacs-require 'my-theme01)))\n"
-              "(setq ergoemacs-mode--start-p t)"
-              "(ergoemacs-mode 1)\n"
-              "(when (and (eq (key-binding (kbd \"C-x 1\")) 
'delete-other-windows)\n"
-              "           (eq (key-binding (kbd \"C-x 2\")) 
'split-window-vertically)\n"
-              "           (eq (key-binding (kbd \"C-x 3\")) 
'split-window-horizontally))\n"
-              "(with-temp-file \"" w-file "\")\n"
-              "   (message \"Passed\")"
-              "  (insert \"Found\"))\n"
-              (or (and (boundp 'wait-for-me) "")
-                  "(kill-emacs)")))
-    (byte-compile-file temp-file)
-    (message "%s"
-             (shell-command-to-string
-              (format "%s %s -Q -L %s -l %s -l %s"
-                      emacs-exe (if (boundp 'wait-for-me) "-debug-init" 
"--batch")
-                      (expand-file-name (file-name-directory (locate-library 
"ergoemacs-mode")))
-                      (expand-file-name (file-name-sans-extension 
(locate-library "ergoemacs-mode")))
-                      temp-file)))
-    (should (file-exists-p w-file))
-    (when  (file-exists-p temp-file)
-      (delete-file temp-file))
-    (when  (file-exists-p (concat temp-file "c"))
-      (delete-file (concat temp-file "c")))
-    (when (file-exists-p w-file)
-      (delete-file w-file))))
-
-
 (ert-deftest ergoemacs-test-M-J-347 ()
   "Test keys that are not working in #347."
   :tags '(:slow :interactive)
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 39f3eab..7d4ef7d 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -38,6 +38,8 @@
 (autoload 'dired-jump "dired-x" nil t)
 
 (require 'advice)
+(require 'ibuffer)
+(require 'ibuf-ext)
 
 (ergoemacs-component standard-vars ()
   "Enabled/changed variables/modes"



reply via email to

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