[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 78bd8cf 231/325: Remove component stuff
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode 78bd8cf 231/325: Remove component stuff |
Date: |
Sat, 23 Oct 2021 18:49:00 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit 78bd8cf2b65c0ba4b3b09d1b764012b5b0d79410
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Remove component stuff
---
ergoemacs-component.el | 94 --------------------------------
ergoemacs-macros.el | 142 -------------------------------------------------
2 files changed, 236 deletions(-)
diff --git a/ergoemacs-component.el b/ergoemacs-component.el
index 1bd1d6f..b6cd7b6 100644
--- a/ergoemacs-component.el
+++ b/ergoemacs-component.el
@@ -139,100 +139,6 @@ It also passes ARGS if any are specified."
(cdr elt))
args)))))))
-(defun ergoemacs-component-struct--handle-bind-1 (kbd-str def keymap)
- "Tell `ergoemacs-mode' to bind KBD-STR to DEF in KEYMAP."
- (ergoemacs-component-struct--define-key keymap (read-kbd-macro kbd-str) def))
-
-(defun ergoemacs-component-struct--handle-bind (bind &optional keymap)
- "Handle :bind and related properties.
-
-BIND is the property list from the component definition.
-
-KEYMAP is the symbol of a bound keymap. If unspecified, the
-binding assumes KEYMAP is `global-map'."
- (let ((keymap (or keymap 'global-map)))
- (ergoemacs-component-struct--parse-list
- bind #'ergoemacs-component-struct--handle-bind-1 keymap)))
-
-(defun ergoemacs-component-struct--create-component (plist body file)
- "Create ergoemacs component.
-
-PLIST is the component properties
-
-BODY is the body of function.
-
-FILE is the file name where the component was created."
- (ergoemacs-timing (intern (format "create-component-%s" (plist-get plist
:name)))
- (unwind-protect
- (progn
- (setq ergoemacs-component-struct--define-key-current
- (make-ergoemacs-component-struct
- :name (plist-get plist :name)
- :plist (plist-put plist :file file)
- :just-first-keys (or (plist-get plist :just-first-keys) nil)
- :variable-modifiers (or (plist-get plist :variable-modifiers)
'(meta))
- :variable-prefixes (or (plist-get plist :variable-prefixes)
'([apps] [menu] [27]))
- :package-name (plist-get plist :package-name)
- :layout (or (plist-get plist :layout) "us")
- :defer (plist-get plist :defer)))
- (let* ((tmp (plist-get plist :bind-keymap))
- (package-name (plist-get plist :package-name))
- (demand (plist-get plist :demand))
- (defer (if demand nil (plist-get plist :defer)))
- (defer-present-p (or demand defer (memq :defer plist))))
-
- ;; Handle :bind-keymap commands
- (when (and tmp (not defer-present-p) (not defer))
- (setq defer-present-p t defer t)
- (setf (ergoemacs-component-struct-defer
ergoemacs-component-struct--define-key-current) t))
- (ergoemacs-component-struct--handle-bind tmp)
-
- ;; Handle :bind-keymap* commands
- (setq tmp (plist-get plist :bind-keymap*))
- (when (and tmp (not defer-present-p) (not defer))
- (setq defer-present-p t defer t)
- (setf (ergoemacs-component-struct-defer
ergoemacs-component-struct--define-key-current) t))
- (ergoemacs-component-struct--handle-bind tmp
'ergoemacs-override-keymap)
-
- ;; Handle :bind keys
- (setq tmp (plist-get plist :bind))
- (when (and tmp (not defer-present-p) (not defer))
- (setq defer-present-p t defer t)
- (setf (ergoemacs-component-struct-defer
ergoemacs-component-struct--define-key-current) t))
- (ergoemacs-component-struct--handle-bind tmp)
-
- ;; Handle :bind* commands
- (setq tmp (plist-get plist :bind*))
- (when (and tmp (not defer-present-p) (not defer))
- (setq defer-present-p t defer t)
- (setf (ergoemacs-component-struct-defer
ergoemacs-component-struct--define-key-current) t))
- (ergoemacs-component-struct--handle-bind tmp
'ergoemacs-override-keymap)
-
- ;; Handle :commands
- (setq tmp (plist-get plist :commands))
- (when (and tmp (not defer-present-p) (not defer))
- (setq defer-present-p t defer t)
- (setf (ergoemacs-component-struct-defer
ergoemacs-component-struct--define-key-current) t))
- (when package-name
- (cond
- ((and tmp (symbolp tmp))
- (autoload tmp (format "%s" package-name) nil t)
- (push (cons tmp package-name)
(ergoemacs-component-struct-autoloads
ergoemacs-component-struct--define-key-current)))
- ((consp tmp)
- (dolist (f tmp)
- (when (and f (symbolp f))
- (autoload f (format "%s" package-name) nil t)
- (push (cons f package-name)
(ergoemacs-component-struct-autoloads
ergoemacs-component-struct--define-key-current))))))))
- (funcall body)
- (setf (ergoemacs-component-struct-variables
ergoemacs-component-struct--define-key-current)
- (reverse (ergoemacs-component-struct-variables
ergoemacs-component-struct--define-key-current))))
-
- (puthash (concat (ergoemacs-component-struct-name
ergoemacs-component-struct--define-key-current)
- (and (ergoemacs-component-struct-version
ergoemacs-component-struct--define-key-current)
- (concat "::" (ergoemacs-component-struct-version
ergoemacs-component-struct--define-key-current))))
- ergoemacs-component-struct--define-key-current
ergoemacs-component-hash)
- (setq ergoemacs-component-struct--define-key-current nil))))
-
(defun ergoemacs-component-struct--with-hook (when-condition plist body
&optional object)
"How the (when...) conditions in an ergoemacs-mode theme are handled.
WHEN-CONDITION is the when condition that is defined in a theme.
diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el
index 946c2db..c5a1996 100644
--- a/ergoemacs-macros.el
+++ b/ergoemacs-macros.el
@@ -253,148 +253,6 @@ distinguish from the ASCII equivalents:
:variable-prefixes
:layout)
"List of ergoemacs-theme-component properties.")
-;;;###autoload
-(defmacro ergoemacs-theme-component (&rest body-and-plist)
- "A component of an ergoemacs-theme.
-
-This macro parses BODY-AND-PLIST to Emacs code to generate an
-`erogemacs-mode' theme component.
-
-This accepts the following keywords:
-
-:bind -- What keys to bind. This is compatible with use-package
- definitions. That is it can take a command like:
-
- :bind (\"C-.\" . ace-jump-mode)
-
- or list of commands
-
- :bind ((\"M-o l\" . highlight-lines-matching-regexp)
- (\"M-o r\" . highlight-regexp)
- (\"M-o w\" . highlight-phrase))
-
- This list of commands can just be a list without the extra
- parentheses for each command:
-
- :bind (\"M-o l\" . highlight-lines-matching-regexp
- \"M-o r\" . highlight-regexp
- \"M-o w\" . highlight-phrase)
-
-
- Note that these keys may change based on keyboard layouts,
- and also these keys can accept special ergoemacs-commands and
- keymaps (unlike use-package).
-
- When package-name is non-nil, create autoloads for undefined commands.
-
- Default: nil
-
-:bind-keymap -- A keymap to bind. Similar to :bind but used for
- keymaps. This is processed before :bind keywords. While
- this is necessary for use-package, it is not necessary for
- `ergoemacs-mode'. However, this keyword is provided for convenience.
-
- Default: nil
-
-:bind* -- Keys to bind above minor modes (in
- `ergoemacs-override-keymap').
-
- Default: nil
-
-:bind-keymap* -- Keymap to bind above minor modes (in
- `ergoemacs-override-keymap').
-
- Default: nil
-
-:commands -- List of commands to create autoloads for. This can
- take a command like:
-
- :commands ace-jump-mode
-
- Or
-
- :commands (isearch-moccur isearch-all)
-
- When :package-name is non-nil, this will create autoloads for
- the commands.
-
-:defer -- Should this package's loading be deferred?
- When using :commands :bind :bind* :bind-keymap :bind-keymap*
- or :interperter, defer is implied. When :package-name
- is nil, this dosen't do anything.
-
-:demand -- Prevent deferred loading in all cases
-
-Borrowed from `use-package'.
-
-:package-name -- Name of package to load. When non-nil any key
-defition to a single command will create an autoload for that
-command.
-
-Default: nil
-
-:no-load / :no-require -- Don't load/require the package-name.
-
-:ergoemacs-require -- when non-nil, this ergoemacs-component is
-required with `ergoemacs-require'. By default this is disabled
-
-:just-first-keys -- Keys where a fixed amount of the key is based
-on variable keyboard placement, then the rest of the key is
-based on letter. For example with the apps component, the
-just first keys are defined to be [apps ?h], which means the
-[apps h] will be defined based on finger placement, but the
-keys afterward would be based on letter.
-
-By default this is defined as nil, meaning no special keys
-like this occur.
-
-:just-first-keys (list [apps ?h] [menu ?h])
-Defaults to nil
-
-:variable-modifiers -- Modifiers that are considierd variable.
-These modifiers have keys change among various keyboard
-layouts. That is keys are bound based on finger placement
-among various keyboard layouts.
-
-Defaults to '(meta)
-
-:variable-prefixes -- Keyboard prefixes that are considiered
-variable. After these keys are pressed, the keyboard layout
-dictates the keys. That is, keys are bound based on finger
-placement among various keyboard layouts.
-
-Defaults to '([apps] [menu] [27])
-
-:layout -- Layout that the key bindings are based on.
-
-Defaults to us (QWERTY)
-
-Please do not use the following tags, since they are parsed based
-on the definition:
-
-:name -- Component Name
-
-:description -- Component Description
-
-:file -- File where the component was defined."
- (declare (doc-string 2)
- (indent 2))
- (let ((kb (make-symbol "body-and-plist")))
- (setq kb (ergoemacs-theme-component--parse body-and-plist))
- `(let ((plist ',(nth 0 kb))
- (fun '(lambda () ,@(nth 1 kb))))
- (unless (boundp 'ergoemacs-component-hash)
- (defvar ergoemacs-component-hash (make-hash-table :test 'equal)
- "Hash of ergoemacs theme components"))
- (defvar ergoemacs-mode-reset)
- (setq ergoemacs-mode-reset t)
- (puthash ,(plist-get (nth 0 kb) :name)
- `(lambda() ,(plist-get plist :description)
- (ergoemacs-component-struct--create-component
- ',plist ',fun ,(or load-file-name buffer-file-name)))
- ergoemacs-component-hash)
- ,(when (plist-get (nth 0 kb) :ergoemacs-require)
- `(ergoemacs-require ',(intern (plist-get (nth 0 kb) :name)))))))
(defvar ergoemacs-theme-components--modified-plist nil
"Modified plist.")
- [elpa] externals/ergoemacs-mode 12b1018 194/325: Remove unused functions, (continued)
- [elpa] externals/ergoemacs-mode 12b1018 194/325: Remove unused functions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode afc0844 198/325: Fix font problems in help image, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2acbb4a 205/325: Remove a component prompt, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode cb65708 216/325: Remove menu-filter stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 47924dc 203/325: Fix wording, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 728f2d7 209/325: Remove unused ergoemacs-map--modify-active, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 3d61040 220/325: Remove ergoemacs-layouts--no-aliases, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 581be06 212/325: Remove lots of timing code, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1cf6041 225/325: Remove :current-version, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode fe1d378 226/325: Remove :current-theme, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 78bd8cf 231/325: Remove component stuff,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode d10087f 238/325: Remove ergoemacs macro :reset and :set-selection, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2caaef6 239/325: Remove unused functions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 4461083 242/325: Add reduction theme again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 97a2107 243/325: Add back the command loop. Part of it seems broken, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 33cc2d6 244/325: Fix command loop key decriptions, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ef2c71a 245/325: Add back the advices to have the ctrl/alt keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d9b09be 246/325: Make command loop play with unicode only, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode efc8751 249/325: Some fixes based on emacs elpa requirements, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 69abf8d 250/325: Fix ergoemacs-calculate-bindings, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode bed9aa1 253/325: Fix ergoemacs-mode and ergoemacs-themes; turn on cua mode, Stefan Monnier, 2021/10/23