[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 97/117: Move wdired-exit to ergoemacs-keyboard-quit
From: |
Matthew Fidler |
Subject: |
[elpa] 97/117: Move wdired-exit to ergoemacs-keyboard-quit |
Date: |
Fri, 25 Jul 2014 13:24:33 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 2c8d7e6ab3926c7e416836062a05cbdfd7ffc394
Author: Matthew L. Fidler <address@hidden>
Date: Wed Jul 23 12:35:40 2014 -0500
Move wdired-exit to ergoemacs-keyboard-quit
---
ergoemacs-shortcuts.el | 15 ++++++++++++++-
ergoemacs-themes.el | 3 ---
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ergoemacs-shortcuts.el b/ergoemacs-shortcuts.el
index c37f7e6..ecb5c65 100644
--- a/ergoemacs-shortcuts.el
+++ b/ergoemacs-shortcuts.el
@@ -534,6 +534,10 @@ It will replace anything defined by
`ergoemacs-translation'"
(declare-function ergoemacs-key-fn-lookup "ergoemacs-translate.el")
(declare-function ergoemacs-modal-toggle "ergoemacs-modal.el")
(declare-function cua-clear-rectangle-mark "cua-rect.el")
+
+(defvar ergoemacs-keyboard-quit-modes
+ '((wdired-mode wdired-exit))
+ "Escape key for various modes.")
(defvar ergoemacs-mode)
(defvar ergoemacs-no-shortcut-keys)
(defvar ergoemacs-shortcut-keys)
@@ -548,7 +552,9 @@ It will replace anything defined by `ergoemacs-translation'"
- If the 【q】 key is bound to a non self-insert function, exit
by this function. (By convention, the 【q】 key is often quit)
- If the 【Ctrl+G】 key is bound to something other than
- `keyboard-quit' use that.
+ `keyboard-quit' use that.
+- If the major mode has a function defined in
+ `ergoemacs-keyboard-quit', use that.
- If `ergoemacs-mode' knows of the quit function, use that
- If an `ergoemacs-mode' modal translation is active, deactivate it.
- Otherwise issue `keyboard-quit'
@@ -573,6 +579,13 @@ It will replace anything defined by
`ergoemacs-translation'"
(commandp tmp t))
(not (eq 'keyboard-quit tmp))))
(call-interactively tmp))
+ ((and (not (region-active-p))
+ (and (progn
+ (setq tmp (assoc major-mode ergoemacs-keyboard-quit-modes))
+ (if (not tmp) nil
+ (setq tmp (car (cdr tmp)))
+ (commandp tmp t)))))
+ (call-interactively tmp))
(t
(let (defined-fn
ergoemacs-shortcut-keys
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index b572b1c..a5c02bd 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -986,9 +986,6 @@
(ergoemacs-theme-component dired-to-wdired ()
"C-c C-c enters wdired, <escape> exits."
- (when wdired-mode-hook
- :modify-map t
- (define-key wdired-mode-map (kbd "<escape>") 'wdired-exit))
(when dired-mode-hook
:modify-map t
(define-key dired-mode-map (kbd "C-c C-c") 'wdired-change-to-wdired-mode)))
- [elpa] 88/117: Add non-defined functions to map, (continued)
- [elpa] 88/117: Add non-defined functions to map, Matthew Fidler, 2014/07/25
- [elpa] 89/117: Fix byte compile warning, Matthew Fidler, 2014/07/25
- [elpa] 91/117: Fix remaps to not use shortcuts, Matthew Fidler, 2014/07/25
- [elpa] 92/117: Remove local read-key reset; Shouldn't be needed, Matthew Fidler, 2014/07/25
- [elpa] 90/117: Hack to make search-reg work. Should work normally :(, Matthew Fidler, 2014/07/25
- [elpa] 95/117: No need to create autoloads any longer, Matthew Fidler, 2014/07/25
- [elpa] 84/117: Flatten keymaps, Matthew Fidler, 2014/07/25
- [elpa] 93/117: Fix dired-mode-map changes by requiring dired, Matthew Fidler, 2014/07/25
- [elpa] 96/117: Add back dired-jump, Matthew Fidler, 2014/07/25
- [elpa] 87/117: Handle the (keymap (keymap ...)) composed keymap, Matthew Fidler, 2014/07/25
- [elpa] 97/117: Move wdired-exit to ergoemacs-keyboard-quit,
Matthew Fidler <=
- [elpa] 94/117: Apply deferred keys., Matthew Fidler, 2014/07/25
- [elpa] 99/117: Don't save so much. Just save once., Matthew Fidler, 2014/07/25
- [elpa] 100/117: Do not reset ergoemacs-command-shortcuts-hash, Matthew Fidler, 2014/07/25
- [elpa] 101/117: Add DEL as known key binding, Matthew Fidler, 2014/07/25
- [elpa] 102/117: Tell user that the global keys are overriding ergoemacs-keys, Matthew Fidler, 2014/07/25
- [elpa] 103/117: Only complain when initially changing the key, Matthew Fidler, 2014/07/25
- [elpa] 98/117: Don't remove things from the shortcut hash, Matthew Fidler, 2014/07/25
- [elpa] 106/117: Add apropos, Matthew Fidler, 2014/07/25
- [elpa] 105/117: Add C-d test, Matthew Fidler, 2014/07/25
- [elpa] 108/117: Move ergoemacs-translation-assoc declaration, Matthew Fidler, 2014/07/25