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

[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")))))



reply via email to

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