[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode cc8c354 106/325: Simplify ergoemacs-mode
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode cc8c354 106/325: Simplify ergoemacs-mode and remove ergoemacs-mode--update-theme-description |
Date: |
Sat, 23 Oct 2021 18:48:32 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit cc8c354527d1dcca034bd3b083fb10aa3ff0d484
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Simplify ergoemacs-mode and remove ergoemacs-mode--update-theme-description
---
ergoemacs-mode.el | 99 +++++++++++++++++++++----------------------------------
1 file changed, 37 insertions(+), 62 deletions(-)
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 26e7eeb..dab6c00 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -275,50 +275,47 @@ The `execute-extended-command' is now
\\[execute-extended-command].
:group 'ergoemacs-mode
:keymap ergoemacs-menu-keymap
(setq ergoemacs-mode--start-p t)
- (if (and (not noninteractive)
- (not ergoemacs-mode--start-p))
- (if ergoemacs-mode
- (message "Ergoemacs will be started.")
- (message "Ergoemacs startup canceled."))
- (setq ergoemacs-map--hashkey nil)
- (unless ergoemacs-require--ini-p
- (setq ergoemacs-require--ini-p :ini)
- (when ergoemacs-require
- (dolist (elt ergoemacs-require)
- (apply #'ergoemacs-require elt))))
- (let ((refresh-p ergoemacs-component-struct--refresh-variables))
- (if ergoemacs-mode
- (progn
- (setq ergoemacs-mode--default-frame-alist nil)
- (dolist (elt (reverse default-frame-alist))
- (push elt ergoemacs-mode--default-frame-alist))
- (run-hooks 'ergoemacs-mode-startup-hook)
- (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)"
ergoemacs-keyboard-layout)
- (message "Ergoemacs-mode turned ON (%s)."
ergoemacs-keyboard-layout)))
-
- (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))))
- (setq ergoemacs-mode--default-frame-alist nil)
- (run-hooks 'ergoemacs-mode-shutdown-hook)
- (remove-hook 'post-command-hook #'ergoemacs-post-command-hook)
- (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.")
+ (setq ergoemacs-map--hashkey nil)
+ (unless ergoemacs-require--ini-p
+ (setq ergoemacs-require--ini-p :ini)
+ (when ergoemacs-require
+ (dolist (elt ergoemacs-require)
+ (apply #'ergoemacs-require elt))))
+ (let ((refresh-p ergoemacs-component-struct--refresh-variables))
+ ;; Turn on
+ (if ergoemacs-mode
+ (progn
+ (setq ergoemacs-mode--default-frame-alist nil)
+ (dolist (elt (reverse default-frame-alist))
+ (push elt ergoemacs-mode--default-frame-alist))
+ (run-hooks 'ergoemacs-mode-startup-hook)
+ (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)"
ergoemacs-keyboard-layout)
+ (message "Ergoemacs-mode turned ON (%s)."
ergoemacs-keyboard-layout)
+ )
)
+ ;; Turn off
+ (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))))
+ (setq ergoemacs-mode--default-frame-alist nil)
+ (run-hooks 'ergoemacs-mode-shutdown-hook)
+ (remove-hook 'post-command-hook #'ergoemacs-post-command-hook)
+ (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.")
)
)
- (setq ergoemacs-mode-started-p t)
)
+ (setq ergoemacs-mode-started-p t)
)
(defvar ergoemacs--gzip (executable-find "gzip")
@@ -766,28 +763,6 @@ Valid values are:
:group 'ergoemacs-mode)
-(defun ergoemacs-mode--update-theme-description ()
- "Update theme description based on loaded themes."
- (defcustom ergoemacs-theme (if (and (boundp 'ergoemacs-variant)
ergoemacs-variant)
- ergoemacs-variant
- (if (and (boundp 'ergoemacs-theme)
ergoemacs-theme)
- ergoemacs-theme
- (if (getenv "ERGOEMACS_THEME")
- (getenv "ERGOEMACS_THEME")
- nil)))
- (concat"Ergoemacs Keyboard Layout Themes.
-This is a mirror of the environment variable ERGOEMACS_THEME.
-
-Valid values are:
-"
- (ergoemacs-theme--custom-documentation))
- :type (ergoemacs-theme--customization-type)
- :set 'ergoemacs-set-default
- :initialize #'custom-initialize-default
- :group 'ergoemacs-mode))
-
-(add-hook 'ergoemacs-mode-startup-hook
#'ergoemacs-mode--update-theme-description)
-
(defcustom ergoemacs-remap-ignore '(undo-tree-visualize)
"Functions to ignore in `ergoemacs-mode' remaps."
:type '(repeat (sexp :tag "Function"))
- [elpa] externals/ergoemacs-mode 5fbcf0c 048/325: Remove unchorded stuff and related tests, (continued)
- [elpa] externals/ergoemacs-mode 5fbcf0c 048/325: Remove unchorded stuff and related tests, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode c53e573 056/325: Cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5b285ea 057/325: Run everything immediately, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode b16e51c 068/325: Remove unused diminish functions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e7a914b 094/325: Remove ctl-to-alt, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 4e5dfc6 089/325: Turn off caching in ergoemacs-map--composed-list, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5122817 097/325: cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 138245e 096/325: Remove unused separators, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e3d4071 108/325: Remove standard-var component, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8764713 113/325: Fix more warnings, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode cc8c354 106/325: Simplify ergoemacs-mode and remove ergoemacs-mode--update-theme-description,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 9ded0d2 126/325: Move more keys into plain functions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8dc60d8 013/325: Move ergoemacs-test-layout to ergoemacs-test, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode a876297 027/325: Add a comment, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9e8d701 010/325: Remove unused require 'strings and assorted cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f0c4e91 142/325: Unset keys in ibuffer, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1c2f61e 018/325: Remove tabbar-toddle since its only purpose is to download tabber, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8b47756 021/325: Revert "Remove cttl-x-c 'both' option", Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5e0c000 050/325: Cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode c59bedc 047/325: Remove more modal, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 65ad125 054/325: Cleanup, Stefan Monnier, 2021/10/23