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

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

[elpa] externals/ergoemacs-mode fe1d378 226/325: Remove :current-theme


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode fe1d378 226/325: Remove :current-theme
Date: Sat, 23 Oct 2021 18:48:59 -0400 (EDT)

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

    Remove :current-theme
---
 ergoemacs-macros.el       |  4 ----
 ergoemacs-mode.el         | 20 ++++++++++++--------
 ergoemacs-test.el         | 16 +++-------------
 ergoemacs-theme-engine.el |  8 +-------
 4 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index 4a405a3..77852d2 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -691,10 +691,6 @@ When arg1 can be a property.  The following properties are 
supported:
      ((and arg1 (symbolp arg1) (eq arg1 :modifier-desc)
            arg2)
       `(mapconcat #'ergoemacs-key-description--modifier ,arg2 ""))
-     ((and arg1 (symbolp arg1) (eq arg1 :current-theme))
-      `(or (and ergoemacs-theme (stringp ergoemacs-theme) ergoemacs-theme)
-           (and ergoemacs-theme (symbolp ergoemacs-theme) (symbol-name 
ergoemacs-theme))
-           "standard"))
      ((and arg1 (symbolp arg1)
            (memq arg1 ergoemacs--map-properties-list))
       `(,(intern (format "ergoemacs-map-properties--%s" (substring 
(symbol-name arg1) 1))) ,@(cdr args)))
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 9f84e74..b6f1e1d 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -176,14 +176,18 @@ The TEXT will be what the mode-line is set to be."
                       (if (not (eq 'ergoemacs-mode (nth 0 x)))
                           x
                         `(ergoemacs-mode ,(if (or (not ergoemacs-mode-line) 
(eq ergoemacs-mode-line 'no-layout)) ""
-                                            (concat
-                                             (if (string= "standard" 
(ergoemacs :current-theme))
-                                                 " ErgoEmacs"
-                                               (concat " Ergo"
-                                                       (upcase (substring 
(ergoemacs :current-theme) 0 1))
-                                                       (substring (ergoemacs 
:current-theme) 1)))
-                                             "[" ergoemacs-keyboard-layout 
"]")))))
-                    minor-mode-alist)))))
+                                            (concat " ErgoEmacs"
+                                                    "[" 
ergoemacs-keyboard-layout "]")
+                                            )
+                                         )
+                        )
+                      )
+                    minor-mode-alist
+                    )
+            )
+      )
+    )
+  )
 
 (defconst ergoemacs-font-lock-keywords
   
'(("(\\(ergoemacs\\(?:-theme-component\\|-theme\\|-component\\|-require\\|-remove\\|-advice\\|-translation\\|-cache\\|-timing\\|-package\\|-autoload\\)\\)\\_>[
 \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?"
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index 3b61c66..60b30cb 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -156,8 +156,7 @@ sunt in culpa qui officia deserunt mollit anim id est 
laborum.")
           plist (nth 0 kb)
           body (nth 1 kb))
     (macroexpand-all
-     `(let ((old-ergoemacs-theme (ergoemacs :current-theme))
-            (old-type ergoemacs-command-loop-type)
+     `(let ((old-type ergoemacs-command-loop-type)
             (old-paste interprogram-paste-function)
             (old-cut interprogram-cut-function)
             (old-version nil)
@@ -166,8 +165,7 @@ sunt in culpa qui officia deserunt mollit anim id est 
laborum.")
                   `(edmacro-parse-keys ,(plist-get plist :macro) t)))
             (old-ergoemacs-keyboard-layout ergoemacs-keyboard-layout)
             (reset-ergoemacs nil))
-        (setq ergoemacs-theme ,(plist-get plist ':current-theme)
-              ergoemacs-keyboard-layout ,(or (plist-get plist ':layout) "us")
+        (setq ergoemacs-keyboard-layout ,(or (plist-get plist ':layout) "us")
               ergoemacs-command-loop-type nil
               interprogram-paste-function nil
               interprogram-cut-function nil
@@ -175,9 +173,7 @@ sunt in culpa qui officia deserunt mollit anim id est 
laborum.")
               ;; Make sure the copy functions don't think the last
               ;; command was a copy.
               last-command 'ergoemacs-test)
-        (unless (and (equal old-ergoemacs-theme ergoemacs-theme)
-                     (equal old-ergoemacs-keyboard-layout 
ergoemacs-keyboard-layout)
-                     (equal old-version (ergoemacs :current-vresion)))
+        (unless (equal old-ergoemacs-keyboard-layout ergoemacs-keyboard-layout)
           (setq reset-ergoemacs t)
           (ergoemacs-mode-reset))
         
@@ -187,7 +183,6 @@ sunt in culpa qui officia deserunt mollit anim id est 
laborum.")
             (progn
               ,@body)
           (setq ergoemacs-command-loop-type old-type
-                ergoemacs-theme old-ergoemacs-theme
                 ergoemacs-keyboard-layout old-ergoemacs-keyboard-layout
                 interprogram-paste-function old-paste
                 interprogram-cut-function old-cut
@@ -581,7 +576,6 @@ See Issue #138."
           (insert (format "(global-set-key (kbd \"%s\") nil)" delete-def)))
         (insert sk))
       (insert (format "(add-to-list 'load-path \"%s\")" ergoemacs-dir))
-      (insert "(setq ergoemacs-theme nil)")
       (insert "(setq ergoemacs-keyboard-layout \"us\")")
       (unless ignore-prev-global
         (insert "(setq ergoemacs-ignore-prev-global nil)"))
@@ -630,7 +624,6 @@ See Issue #138."
       (insert "(eval-when-compile (load (expand-file-name 
\"ergoemacs-macros\")) (require 'cl-lib))"
               (or (and (boundp 'wait-for-me)
                        "(setq debug-on-error t debug-on-quit t)") "")
-             "(setq ergoemacs-theme nil)"
              "(setq ergoemacs-keyboard-layout \"us\")"
               "(ergoemacs-mode 1)\n"
              "(global-set-key (kbd \"C-SPC\") 'set-mark-command)\n"
@@ -668,7 +661,6 @@ See Issue #138."
       (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)") "")
-             "(setq ergoemacs-theme nil)"
              "(setq ergoemacs-keyboard-layout \"us\")"
               "(ergoemacs-mode 1)\n"
              "(global-set-key (kbd \"C-SPC\") 'set-mark-command)\n"
@@ -713,7 +705,6 @@ See Issue #138."
     (with-temp-file temp-file
       (insert "(condition-case err (progn ")
       (insert (format "(add-to-list 'load-path \"%s\")" ergoemacs-dir))
-      (insert "(setq ergoemacs-theme nil)")
       (insert "(setq ergoemacs-keyboard-layout \"us\")")
       (insert "(setq ergoemacs-command-loop-type nil)")
       (insert "(require 'ergoemacs-mode)(require 'ergoemacs-test)(setq 
ergoemacs-mode--start-p t)(ergoemacs-mode 1)")
@@ -771,7 +762,6 @@ See Issue #138."
     (with-temp-file temp-file
       (insert "(condition-case err (progn ")
       (insert (format "(add-to-list 'load-path \"%s\")" ergoemacs-dir))
-      (insert "(setq ergoemacs-theme nil)")
       (insert "(setq ergoemacs-keyboard-layout \"us\")")
       (insert "(setq ergoemacs-command-loop-type nil)")
       (insert "(require 'ergoemacs-mode)(require 'ergoemacs-test)(setq 
ergoemacs-mode--start-p t)(ergoemacs-mode 1)")
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index eb3b950..2aa9fa9 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -94,7 +94,7 @@
 (defun ergoemacs-theme-components (&optional theme)
   "Get a list of components used for the current theme.
 This respects `ergoemacs-theme-options'."
-  (let* ((theme (or theme (ergoemacs :current-theme)))
+  (let* ((theme "standard")
          (theme-plist (ergoemacs-gethash theme ergoemacs-theme-hash))
          components opt first tmp required)
     (if (not theme)
@@ -194,12 +194,6 @@ When AT-END is non-nil, append a $ to the regular 
expression."
       (setq ret (concat ret "$")))
     ret))
 
-(defun ergoemacs-theme--get-version ()
-  "Get the current version for the current theme."
-  (let ((theme-ver (assoc (ergoemacs :current-theme) ergoemacs-theme-version)))
-    (if (not theme-ver) nil
-      (car (cdr theme-ver)))))
-
 (defun ergoemacs-theme-at-point ()
   "Get the `ergoemacs-theme' defined at or before point.
 Return 0 if there is no such symbol.  Uses



reply via email to

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