[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 104/117: Respect global keys only if true global map
From: |
Matthew Fidler |
Subject: |
[elpa] 104/117: Respect global keys only if true global map |
Date: |
Fri, 25 Jul 2014 13:24:37 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit e0de2fba91c939fef58a83974c64c77900e6d1e0
Author: Matthew L. Fidler <address@hidden>
Date: Thu Jul 24 09:11:51 2014 -0500
Respect global keys only if true global map
---
ergoemacs-advices.el | 4 ++--
ergoemacs-mode.el | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ergoemacs-advices.el b/ergoemacs-advices.el
index 8d1397d..168baa9 100644
--- a/ergoemacs-advices.el
+++ b/ergoemacs-advices.el
@@ -67,7 +67,7 @@ If `pre-command-hook' is used and `ergoemacs-mode' is remove
from `ergoemacs-pre
ergoemacs-read-shortcut-keys
ergoemacs-read-no-shortcut-keys)
ad-do-it))
-
+(defvar ergoemacs-global-map)
(defadvice define-key (around ergoemacs-define-key-advice (keymap key def)
activate)
"This does the right thing when modifying `ergoemacs-keymap'.
Also adds keymap-flag for user-defined keys run with `run-mode-hooks'."
@@ -85,7 +85,7 @@ Also adds keymap-flag for user-defined keys run with
`run-mode-hooks'."
;; (setq ergoemacs-local-emulation-mode-map-alist
;; (list (cons 'ergoemacs-mode (make-sparse-keymap)))))
(if (and ergoemacs-run-mode-hooks
- (not (equal keymap (current-global-map)))
+ (not (equal keymap ergoemacs-global-map))
(not (equal keymap ergoemacs-keymap)))
(let ((ergoemacs-run-mode-hooks nil)
(new-key (read-kbd-macro
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 7071be3..85f04bf 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -465,6 +465,8 @@ When REMOVE is true, remove the emulations."
ergoemacs-no-shortcut-emulation-mode-map-alist)))
(funcall (if remove #'remove-hook #'add-hook) 'emulation-mode-map-alists
hook)))
+(defvar ergoemacs-global-map nil
+ "Saves the current global map to make sure the global changes are true.")
(defvar ns-alternate-modifier)
(defvar mac-alternate-modifier)
(defvar ergoemacs-read-key-overriding-overlay-save)
@@ -508,7 +510,8 @@ bindings the keymap is:
(if ergoemacs-mode
(progn
(setq ergoemacs-debug-heading-start-time (float-time)
- ergoemacs-debug-heading-last-time (float-time))
+ ergoemacs-debug-heading-last-time (float-time)
+ ergoemacs-global-map (current-global-map))
(ergoemacs-debug "* Ergoemacs-mode is turning ON.")
(when cua-mode
(cua-mode -1)
- [elpa] 94/117: Apply deferred keys., (continued)
- [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
- [elpa] 104/117: Respect global keys only if true global map,
Matthew Fidler <=
- [elpa] 107/117: Make sure the read-input-keymap has M-O and M-[. Possibly fix Issue #280, Matthew Fidler, 2014/07/25
- [elpa] 109/117: Fix extracting of prefixes, Matthew Fidler, 2014/07/25
- [elpa] 110/117: Add partial support of customize-set-variable, Matthew Fidler, 2014/07/25
- [elpa] 112/117: Add deferred keys for emulation-maps, Matthew Fidler, 2014/07/25
- [elpa] 111/117: Make sure ergoemacs-menus is loaded for any easymenu changes, Matthew Fidler, 2014/07/25
- [elpa] 114/117: Remap save-buffer to commit in log-edit-mode, Matthew Fidler, 2014/07/25
- [elpa] 116/117: Fix some undo bindings., Matthew Fidler, 2014/07/25
- [elpa] 115/117: Deferred keys now work for maps that are not modified, Matthew Fidler, 2014/07/25
- [elpa] 117/117: v5.14.7.3 - Fixed some undo key bindings to work better with undo-tree - Now deferred key bindings work: When a function is undefined, it isn't added to the keymap until it becomes defined - Settings called within an ergoemacs-mode theme component block now will use customize-set-variable when they are a customizable variable. - Added some more globally defined keys to better characterize what is globally changed. - When saving settings, only save to the customize file once. - Turn off ergoemacs-mode and turn on ergoemacs-ini-mode before saving the settings. This allows ergoemacs-mode to be called when the initialization file calls it, hopefully taking care of some issues with keys changing if ergoemacs-mode is loaded before it resets the globally bound keymaps. - Added visual-line-mode support to the smart functions - Ergoemacs-mode no longer uses composed keymaps as final keymaps, so it is possible to extend to emacs 23 (will require interim composed maps so this function will need to be back-ported). - Allow ergoemacs-mode line to be turned off - Most of ergoemacs-mode has been changed to lexical scoping - Added partial support of guide-key-mode - Ergoemacs keyboard quit now looks up functions based on major mode, nd if "Q" and "C-g" are bound to something interesting, Matthew Fidler, 2014/07/25
- [elpa] 113/117: Only check for globally defined keys when setting up ergoemacs-mode keymaps, Matthew Fidler, 2014/07/25