[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 8b40059 102/325: Replace ergoemacs-theme
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode 8b40059 102/325: Replace ergoemacs-theme--list with hard coded "standard" |
Date: |
Sat, 23 Oct 2021 18:48:31 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit 8b400594933a63cd2648f747ec0bc50c85d57865
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Replace ergoemacs-theme--list with hard coded "standard"
---
ergoemacs-lib.el | 56 ++++++++++++++++++++++++-----------------------
ergoemacs-theme-engine.el | 20 +++--------------
ergoemacs-translate.el | 4 +---
3 files changed, 33 insertions(+), 47 deletions(-)
diff --git a/ergoemacs-lib.el b/ergoemacs-lib.el
index 7050c9a..75688d6 100644
--- a/ergoemacs-lib.el
+++ b/ergoemacs-lib.el
@@ -60,7 +60,6 @@
(declare-function ergoemacs-autoloadp "ergoemacs-macros")
(declare-function ergoemacs-mode-reset "ergoemacs-mode")
-(declare-function ergoemacs-theme--list "ergoemacs-theme-engine")
(declare-function ergoemacs-theme-option-on "ergoemacs-theme-engine")
(declare-function ergoemacs-key-description--menu "ergoemacs-key-description")
@@ -252,32 +251,35 @@ ergoemacs THEME."
(let (ergoemacs-mode)
(ergoemacs-require new-option theme type)))
(let ((option-sym
- (or (and option (stringp option) (intern option)) option)))
- (dolist (theme (or (and theme (or (and (eq (type-of theme) 'cons)
theme) (list theme)))
- (ergoemacs-theme--list)))
- (let ((theme-plist (ergoemacs-gethash (if (and theme (stringp
theme)) theme
- (symbol-name theme))
- ergoemacs-theme-hash))
- comp on off)
- (setq comp (plist-get theme-plist :components)
- on (plist-get theme-plist :optional-on)
- off (plist-get theme-plist :optional-off))
- (setq comp (delq option-sym comp)
- on (delq option-sym on)
- off (delq option-sym off))
- (cond
- (remove) ;; Don't do anything.
- ((or (not type) (memq type '(required-hidden :required-hidden)))
- (push option-sym comp))
- ((memq type '(off :off))
- (push option-sym off))
- ((memq type '(on :on))
- (push option-sym on)))
- (setq theme-plist (plist-put theme-plist :components comp))
- (setq theme-plist (plist-put theme-plist :optional-on on))
- (setq theme-plist (plist-put theme-plist :optional-off off))
- (puthash (if (and theme (stringp theme)) theme (symbol-name
theme)) theme-plist
- ergoemacs-theme-hash)))))
+ (or (and option (stringp option) (intern option)) option))
+ (theme "standard")
+ )
+ (let ((theme-plist (ergoemacs-gethash (if (and theme (stringp
theme)) theme
+ (symbol-name theme))
+ ergoemacs-theme-hash))
+ comp on off)
+ (setq comp (plist-get theme-plist :components)
+ on (plist-get theme-plist :optional-on)
+ off (plist-get theme-plist :optional-off))
+ (setq comp (delq option-sym comp)
+ on (delq option-sym on)
+ off (delq option-sym off))
+ (cond
+ (remove) ;; Don't do anything.
+ ((or (not type) (memq type '(required-hidden :required-hidden)))
+ (push option-sym comp))
+ ((memq type '(off :off))
+ (push option-sym off))
+ ((memq type '(on :on))
+ (push option-sym on)))
+ (setq theme-plist (plist-put theme-plist :components comp))
+ (setq theme-plist (plist-put theme-plist :optional-on on))
+ (setq theme-plist (plist-put theme-plist :optional-off off))
+ (puthash (if (and theme (stringp theme)) theme (symbol-name
theme)) theme-plist
+ ergoemacs-theme-hash)
+ )
+ )
+ )
(unless (eq ergoemacs-require--ini-p :ini)
(ergoemacs-theme-option-on option t))))
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index f07bf3e..091a4af 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -175,27 +175,13 @@ If OFF is non-nil, turn off the options instead."
(ergoemacs-theme-option-on option)))
-(defun ergoemacs-theme--list (&optional silent)
- "Gets the list of themes.
-When SILENT is true, also include silent themes"
- (let (ret)
- ;; All this is done to copy lists so that sorts will not
- ;; destroy the final list. Please keep this here so that errors
- ;; will not be introduced (seems silly)
- (setq ret (mapcar (lambda(x) x)
- (or (and silent
- (append (ergoemacs-gethash "defined-themes"
ergoemacs-theme-hash)
- (ergoemacs-gethash "silent-themes"
ergoemacs-theme-hash)))
- (ergoemacs-gethash "defined-themes" ergoemacs-theme-hash))))
- ret))
-
(defun ergoemacs-theme--custom-documentation (&optional themes ini)
"Get list of all known layouts and their documentation.
THEMES is the list of themes for the customize documentation.
INI is provided for initilazation, to shorten the descriptions."
- (let ((themes (or themes (sort (ergoemacs-theme--list) 'string<))))
+ (let ((themes (list "standard")))
(mapconcat
(lambda(theme)
(if ini
@@ -210,13 +196,13 @@ INI is provided for initilazation, to shorten the
descriptions."
,@(mapcar
(lambda(elt)
`(const :tag ,elt :value ,elt))
- (sort (ergoemacs-theme--list t) 'string<))))
+ (list "standard"))))
(defun ergoemacs-theme--regexp (&optional at-end)
"Return a regexp of `ergoemacs-mode' themes.
When AT-END is non-nil, append a $ to the regular expression."
(let (ret)
- (setq ret (regexp-opt (ergoemacs-theme--list t) 'symbols))
+ (setq ret (regexp-opt (list "standard") 'symbols))
(when at-end
(setq ret (concat ret "$")))
ret))
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index de4e8c1..a1cde13 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -67,7 +67,6 @@
(defvar ergoemacs-command-loop--universal-functions)
(declare-function ergoemacs-layouts--list "ergoemacs-layouts")
-(declare-function ergoemacs-theme--list "ergoemacs-theme-engine")
(declare-function ergoemacs-mode-reset "ergoemacs-mode")
(declare-function ergoemacs-layouts--custom-documentation "ergoemacs-layouts")
(declare-function ergoemacs-theme--custom-documentation
"ergoemacs-theme-engine")
@@ -1082,8 +1081,7 @@ If there are no gui elements, retun nil."
(let ((layouts (or (and all-layouts (sort (ergoemacs-layouts--list)
'string<))
(and (eq (ergoemacs :layout) 'ergoemacs-layout-us) (list
"us"))
(list "us" ergoemacs-keyboard-layout)))
- (themes (or (and all-themes (sort (ergoemacs-theme--list) 'string<))
- (list ergoemacs-theme)))
+ (themes (list "standard"))
(original-layout ergoemacs-keyboard-layout)
(original-theme ergoemacs-theme)
ret)
- [elpa] externals/ergoemacs-mode 331a359 007/325: Directly bind a bunch of shift keys, (continued)
- [elpa] externals/ergoemacs-mode 331a359 007/325: Directly bind a bunch of shift keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 25dd364 038/325: Remove ergoemacs-command-loop--modal-stack, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 96cb33d 040/325: Remove ergoemacs-command-loop--modal-p, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ade1df9 046/325: Cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 61410ff 051/325: Fix a typo when invoking a timeout, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 6868238 058/325: Merge branch 'master' into ergoterm, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 87a332c 073/325: Merge branch 'master' into HEAD, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9664994 093/325: Remove eshell <home> weirdness, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 7499511 080/325: Spacing fix, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode dd8796f 075/325: Remove unused shift translation code, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8b40059 102/325: Replace ergoemacs-theme--list with hard coded "standard",
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode a9ec5df 122/325: Remove Redo menu, make Undo show up, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8cb01f2 100/325: Remove unused declarations, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ad4202a 130/325: Remove unused components, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 63ba586 133/325: Get rid of undo-tree and browse-kill-ring bindings, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ff0ec3b 140/325: Make comint and dired bindings into hooks, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2adc6aa 146/325: Remove many C-S- bindings. Make M-C-[:; ] work. Small cleanups., Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d198bd3 149/325: Delete dead code, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1ca781f 145/325: Fix info mode, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 238435f 154/325: Lots of isearch fixes, with a few other minor fixes to mode maps, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode cbe3e19 157/325: Add create/delete frame to menu, Stefan Monnier, 2021/10/23