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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 93/287: Add ergoemacs-shortcut-emulation-mode-map-alist


From: Matthew Fidler
Subject: [elpa] 93/287: Add ergoemacs-shortcut-emulation-mode-map-alist
Date: Wed, 02 Jul 2014 14:44:55 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit a0bb65603f57e482abb9f7adb0487929a13458b6
Author: Matthew L. Fidler <address@hidden>
Date:   Fri Jun 13 11:02:17 2014 -0500

    Add ergoemacs-shortcut-emulation-mode-map-alist
---
 ergoemacs-mode.el         |    6 +++++-
 ergoemacs-shortcuts.el    |   14 +++++++-------
 ergoemacs-theme-engine.el |   32 ++++++++++++++++----------------
 3 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 20c2d8b..5e93d47 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -385,13 +385,17 @@ Valid values are:
 (defvar ergoemacs-emulation-mode-map-alist nil
   "Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
 
+(defvar ergoemacs-shortcut-emulation-mode-map-alist nil
+  "Override keys in `ergoemacs-mode' for `emulation-mode-map-alist'")
+
 (defun ergoemacs-emulations (&optional remove)
   "Add ergoemacs emulations to `emulation-mode-map-alist'.
 When REMOVE is true, remove the emulations."
   (dolist (hook (reverse '(ergoemacs-modal-emulation-mode-map-alist
                            ergoemacs-read-emulation-mode-map-alist
                            ergoemacs-repeat-emulation-mode-map-alist
-                           ergoemacs-emulation-mode-map-alist)))
+                           ergoemacs-emulation-mode-map-alist
+                           ergoemacs-shortcut-emulation-mode-map-alist)))
     (funcall (if remove #'remove-hook #'add-hook) #'emulation-mode-map-alists 
hook)))
 
 ;; ErgoEmacs minor mode
diff --git a/ergoemacs-shortcuts.el b/ergoemacs-shortcuts.el
index 2b0ca6f..41d6f60 100644
--- a/ergoemacs-shortcuts.el
+++ b/ergoemacs-shortcuts.el
@@ -1133,7 +1133,7 @@ argument prompt.
                     (condition-case err
                         (interactive-form local-fn)
                       (error nil)))
-                      (eq local-fn 'ergoemacs-read-key-swap))
+                   (eq local-fn 'ergoemacs-read-key-swap))
               ;; Either the `ergoemacs-read-key-swap' is not applicable,
               ;; or not specified correctly.  Therefore set local-fn to
               ;; nil.
@@ -1409,14 +1409,14 @@ defined in the major/minor modes (by
   (let ((override (key-binding (read-kbd-macro (format "<ergoemacs-user> %s" 
(key-description keys)))))
         cmd1 cmd2)
     (unless (condition-case err
-              (interactive-form override)
-            (error nil))
+                (interactive-form override)
+              (error nil))
       (setq override nil))
     (unless override
       (setq cmd1 (ergoemacs-with-overrides
                   (key-binding keys)))
       (when (condition-case err
-                  (interactive-form cmd1)
+                (interactive-form cmd1)
               (error nil))
         (setq cmd2 (ergoemacs-with-major-and-minor-modes
                     (key-binding keys)))
@@ -1470,9 +1470,9 @@ Basically, this gets the keys called and passes the 
arguments to`ergoemacs-read-
                `(lambda() (interactive) (ergoemacs-read-key ,(key-description 
key))))))))
      (apply 'append
             (mapcar
-              (lambda (cmd)
-                (where-is-internal cmd))
-              (or cmds '(ergoemacs-shortcut-movement 
ergoemacs-shortcut-movement-no-shift-select)))))
+             (lambda (cmd)
+               (where-is-internal cmd))
+             (or cmds '(ergoemacs-shortcut-movement 
ergoemacs-shortcut-movement-no-shift-select)))))
     keymap))
 
 (defun ergoemacs-shortcut-movement (&optional opt-args)
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 98dc89a..e80bc15 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -1290,19 +1290,20 @@ The actual keymap changes are included in 
`ergoemacs-emulation-mode-map-alist'."
             ergoemacs-read-emulation-mode-map-alist 
`((ergoemacs-read-input-keys ,@final-read-map))
             ergoemacs-shortcut-keymap final-shortcut-map
             ergoemacs-emulation-mode-map-alist
-            `(,@(reverse
-                 (append
-                  hook-map-list
-                  (mapcar ;; Get the minor-mode maps that will be added.
-                   (lambda(remap)
-                     (with-slots (map
-                                  deferred-keys) (ergoemacs-get-fixed-map obj 
remap)
-                       (when deferred-keys
-                         (push (cons i (cons remap deferred-keys)) 
ergoemacs-deferred-keys))
-                       (setq i (+ i 1))
-                       (cons remap map)))
-                   (ergoemacs-get-hooks obj "-mode\\'"))))
-              (ergoemacs-shortcut-keys ,@final-shortcut-map)))
+            (reverse
+             (append
+              hook-map-list
+              (mapcar ;; Get the minor-mode maps that will be added.
+               (lambda(remap)
+                 (with-slots (map
+                              deferred-keys) (ergoemacs-get-fixed-map obj 
remap)
+                   (when deferred-keys
+                     (push (cons i (cons remap deferred-keys)) 
ergoemacs-deferred-keys))
+                   (setq i (+ i 1))
+                   (cons remap map)))
+               (ergoemacs-get-hooks obj "-mode\\'"))))
+            ergoemacs-shortcut-emulation-mode-map-alist
+            `((ergoemacs-shortcut-keys ,@final-shortcut-map)))
       ;; Apply variables and mode changes.
       (if remove-p
           (progn
@@ -1937,9 +1938,8 @@ DONT-COLLAPSE doesn't collapse empty keymaps"
             ;; Setup emulation maps.
             (setq ergoemacs-read-emulation-mode-map-alist
                   (list (cons 'ergoemacs-read-input-keys 
ergoemacs-read-input-keymap))
-                  ergoemacs-emulation-mode-map-alist
-                  (append (nbutlast ergoemacs-emulation-mode-map-alist 1)
-                          (list (cons 'ergoemacs-shortcut-keys 
ergoemacs-shortcut-keymap))))
+                  ergoemacs-shortcut-emulation-mode-map-alist
+                  (list (cons 'ergoemacs-shortcut-keys 
ergoemacs-shortcut-keymap)))
             ;;Put maps in `minor-mode-map-alist'
             (ergoemacs-shuffle-keys t))
           (when (and (or (commandp lk t)



reply via email to

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