[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 728f2d7 209/325: Remove unused ergoemacs
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode 728f2d7 209/325: Remove unused ergoemacs-map--modify-active |
Date: |
Sat, 23 Oct 2021 18:48:55 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit 728f2d7823e829209bbf583eafa97536edab81d6
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Remove unused ergoemacs-map--modify-active
---
ergoemacs-map.el | 111 ------------------------------------------------------
ergoemacs-test.el | 4 --
2 files changed, 115 deletions(-)
diff --git a/ergoemacs-map.el b/ergoemacs-map.el
index ed1e58d..afcc344 100644
--- a/ergoemacs-map.el
+++ b/ergoemacs-map.el
@@ -935,121 +935,10 @@ If it is a tranisent map, assign the :dont-modify-p
property to t."
(ergoemacs-setcdr (cdr map) (cdr (ergoemacs (ergoemacs :original map))))))
-(defvar ergoemacs-map--modify-active-last-overriding-terminal-local-map nil)
-(defvar ergoemacs-map--modify-active-last-overriding-local-map nil)
-(defvar ergoemacs-map--modify-active-last-char-map nil)
-(defvar ergoemacs-map--modify-active-last-local-map nil)
(defvar ergoemacs-map--saved-global-map nil)
(defvar ergoemacs-map--last-global-map nil)
(defvar ergoemacs-read-from-minibuffer-map nil
"If non-nil, keymap that is being read by the minibuffer.")
-(defun ergoemacs-map--modify-active (&optional ini)
- "Modifies Active maps.
-
-When INI is non-nil, add conditional maps to `minor-mode-map-alist'."
- (when ergoemacs-mode
- (let ((char-map (get-char-property-and-overlay (point) 'keymap))
- (local-map (get-text-property (point) 'local-map))
- (current-local-map (current-local-map))
- tmp)
- (when (and overriding-terminal-local-map
- (not (eq overriding-terminal-local-map
ergoemacs-map--modify-active-last-overriding-terminal-local-map))
- (not (ergoemacs overriding-terminal-local-map :installed-p))
- (not (memq 'add-keymap-witness overriding-terminal-local-map)))
- ;; (ergoemacs-map--temporary-map-properties
overriding-terminal-local-map)
- (setq overriding-terminal-local-map (ergoemacs
overriding-terminal-local-map)))
-
- (when (and overriding-local-map
- (not (eq overriding-local-map
ergoemacs-map--modify-active-last-overriding-local-map))
- (not (ergoemacs overriding-local-map :installed-p)))
- ;; (ergoemacs-map--temporary-map-properties overriding-local-map)
- (setq overriding-local-map (ergoemacs overriding-local-map)))
-
- (ergoemacs-save-buffer-state
- (when (and char-map (symbolp char-map))
- (setq char-map (ergoemacs-sv char-map)))
- (when (and (listp char-map)
- (car char-map)
- (not (eq (car char-map)
ergoemacs-map--modify-active-last-char-map))
- (not (ergoemacs (car char-map) :installed-p)))
- (cond
- ((cdr char-map)
- ;; Overlay
- (overlay-put (cdr char-map) 'keymap (ergoemacs (car char-map))))
- (t ;; Text Property
- (put-text-property (previous-single-char-property-change (point)
'keymap)
- (next-single-char-property-change (point) 'keymap)
- 'keymap
- (ergoemacs (car char-map))))))
- (when (and local-map (symbolp local-map))
- (setq local-map (ergoemacs-sv local-map)))
- (when (and local-map
- (not (eq local-map
ergoemacs-map--modify-active-last-local-map))
- (not (ergoemacs local-map :installed-p)))
- (put-text-property (previous-single-char-property-change (point)
'local-map)
- (next-single-char-property-change (point)
'local-map)
- 'local-map (ergoemacs local-map)))
- ;; Save before any changes happen (ie in calc)
- (when (and (not ergoemacs-map--saved-global-map)
- (ergoemacs :ignore-global-changes-p))
- (setq ergoemacs-map--saved-global-map (copy-keymap global-map)))
- ;; Restore outside of modes that change the global map (calc)
- (when (and ergoemacs-map--saved-global-map
- (not (ergoemacs :ignore-global-changes-p)))
- (setq global-map (copy-keymap ergoemacs-map--saved-global-map)
- ergoemacs-map--saved-global-map nil)
- (use-global-map global-map))
- (when (and (setq tmp (current-global-map))
- (ergoemacs-keymapp tmp)
- (not (eq tmp global-map))
- (or (not ergoemacs-map--last-global-map)
- (not (eq ergoemacs-map--last-global-map tmp)))
- (not (ergoemacs tmp :installed-p)))
- (use-global-map (ergoemacs tmp))
- (setq ergoemacs-map--last-global-map (current-global-map)))
- (when (and current-local-map (not (ergoemacs current-local-map
:installed-p))
- (not (minibufferp)))
- (setq ergoemacs-map--breadcrumb (format "%s" major-mode))
- (when (eq major-mode 'ess-mode)
- (setq ergoemacs-map--breadcrumb (format "ess-mode-%s" ess-language)))
- ;; term-mode has a term-raw-map that it checks against
- ;; current-local-map to see if it is in line-mode or
- ;; char-mode. So we have to modify both term-raw-map and
- ;; current-local-map to be able to switch.
- (if (not (eq major-mode 'term-mode))
- (use-local-map (ergoemacs current-local-map))
- (progn
- (setq term-raw-map (ergoemacs term-raw-map))
- (use-local-map term-raw-map))
- )
- (setq ergoemacs-map--breadcrumb ""))
- (when (and (minibufferp) ergoemacs-read-from-minibuffer-map)
- ;; Preserve bindings for space, such as when completing a filename
- (if (and (equal (key-binding " ") 'self-insert-command))
- (use-local-map (list 'keymap
- '(32 . self-insert-command) ;; space==32
- (ergoemacs
ergoemacs-read-from-minibuffer-map)))
- (use-local-map (ergoemacs ergoemacs-read-from-minibuffer-map)))
- (setq ergoemacs-read-from-minibuffer-map nil
- ergoemacs-map--breadcrumb ""))
- ;; Run deferred "hooks"
- (when (and (minibufferp)
ergoemacs-component-struct--composed-hook-minibuffer)
- (dolist (elt (reverse
ergoemacs-component-struct--composed-hook-minibuffer))
- (when (equal (ergoemacs (symbol-value elt) :map-key)
- (ergoemacs ergoemacs-read-from-minibuffer-map :map-key))
- (use-local-map (make-composed-keymap (cdr elt)
(current-local-map))))
- (ergoemacs-save-buffer-state
- (set (make-local-variable (car elt)) (make-composed-keymap (cdr
elt) (symbol-value (car elt))))))
- (setq ergoemacs-component-struct--composed-hook-minibuffer nil)))
- (setq ergoemacs-map--modify-active-last-overriding-terminal-local-map
overriding-terminal-local-map
- ergoemacs-map--modify-active-last-overriding-local-map
overriding-local-map
- ergoemacs-map--modify-active-last-char-map char-map
- ergoemacs-map--modify-active-last-local-map local-map)
- (ergoemacs-map--emulation-mode-map-alists)
- (ergoemacs-map--minor-mode-map-alist ini)
- (ergoemacs-map--minor-mode-overriding-map-alist))))
-
-
(defvar ergoemacs-map--quit-map nil
"Keymap of quit keys for local keymap.")
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index fa63fec..e6fe690 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -66,7 +66,6 @@
(declare-function ergoemacs-paste "ergoemacs-functions")
(declare-function ergoemacs-map-- "ergoemacs-map")
-(declare-function ergoemacs-map--modify-active "ergoemacs-map")
(declare-function ergoemacs-translate--event-mods "ergoemacs-translate")
(declare-function ergoemacs-translate--quail-to-ergoemacs
"ergoemacs-translate")
@@ -489,7 +488,6 @@ ergoemacs-mode.el:949:;;; ergoemacs-mode.el ends here
Grep finished (matches found) at Fri Aug 22 08:30:37
")
(grep-mode)
- ;; (ergoemacs-map--modify-active)
(goto-char (point-min))
(execute-kbd-macro macro)
(should (string= (buffer-substring (point) (+ 16 (point)))
@@ -527,7 +525,6 @@ Grep finished (matches found) at Fri Aug 22 08:30:37
(delete-region (point-min) (point-max))
(insert ergoemacs-test-lorem-ipsum)
(org-mode)
- (ergoemacs-map--modify-active)
(should (eq (key-binding (kbd "<M-right>")) 'ergoemacs-org-metaright))
(should (eq (key-binding (kbd "<M-left>")) 'ergoemacs-org-metaleft))
(should (eq (key-binding (kbd "<M-up>")) 'ergoemacs-org-metaup))
@@ -871,7 +868,6 @@ Tests Issue #372."
(define-key dired-mode-map "|"
'dired-sort-menu-toggle-reverse)
))
(dired ergoemacs-dir)
- (ergoemacs-map--modify-active)
(should (equal (key-binding (kbd "s s")) '(lambda () "sort by Size"
(interactive) (dired-sort-other (concat dired-listing-switches "-AlS --si
--time-style long-iso")))))
(should (equal (key-binding (kbd "s .")) '(lambda () "sort by eXtension"
(interactive) (dired-sort-other (concat dired-listing-switches "X")))))
(should (equal (key-binding (kbd "s t")) '(lambda () "sort by Time"
(interactive) (dired-sort-other (concat dired-listing-switches "t")))))
- [elpa] externals/ergoemacs-mode 9be4392 180/325: Remove lots of command-loop stuff, (continued)
- [elpa] externals/ergoemacs-mode 9be4392 180/325: Remove lots of command-loop stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d092102 181/325: Remove pre- and post-command hooks, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode cea18f4 182/325: Remove more command-loop stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9d758c6 190/325: Remove unused hooks, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9cd2f3b 193/325: Always display unicode characters, Stefan Monnier, 2021/10/23
- [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 <=
- [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, 2021/10/23
- [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