[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 52/287: Debugging ergoemacs-theme obect
From: |
Matthew Fidler |
Subject: |
[elpa] 52/287: Debugging ergoemacs-theme obect |
Date: |
Wed, 02 Jul 2014 14:44:32 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 44a2d3adf28c7b4a6446fd8d3b75ff2aa0e1e361
Author: Matthew L. Fidler <address@hidden>
Date: Thu Jun 5 00:05:19 2014 +0800
Debugging ergoemacs-theme obect
---
ergoemacs-modal.el | 15 +--------------
ergoemacs-mode.el | 9 ++++++---
ergoemacs-shortcuts.el | 3 ++-
ergoemacs-theme-engine.el | 37 +++++++++++++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 18 deletions(-)
diff --git a/ergoemacs-modal.el b/ergoemacs-modal.el
index 94c5acb..0269322 100644
--- a/ergoemacs-modal.el
+++ b/ergoemacs-modal.el
@@ -201,21 +201,8 @@ modal state is currently enabled."
(defun ergoemacs-minibuffer-setup ()
"Exit temporary overlay maps."
- ;; (setq ergoemacs-exit-temp-map-var t)
- (ergoemacs-debug-heading "ergoemacs-minibuffer-setup")
- (ergoemacs-debug "emulation-mode-map-alists: %s" emulation-mode-map-alists)
- (ergoemacs-debug "ergoemacs-emulation-mode-map-alist: %s"
- (mapcar
- (lambda(x) (nth 0 x))
- ergoemacs-emulation-mode-map-alist))
- (ergoemacs-debug "minor-mode-map-alist: %s"
- (mapcar
- (lambda(x) (nth 0 x))
- minor-mode-map-alist))
;; (setq ergoemacs-shortcut-keys t)
- (ergoemacs-debug "ergoemacs-shortcut-keys: %s" ergoemacs-shortcut-keys)
- (ergoemacs-debug "ergoemacs-mode: %s" ergoemacs-mode)
- (ergoemacs-debug "ergoemacs-unbind-keys: %s" ergoemacs-unbind-keys))
+ )
(defun ergoemacs-modal-p ()
"Determine if the command should be modal.
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 7179e82..4da5533 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -77,9 +77,12 @@
(defun ergoemacs-debug-keymap (keymap)
"Print keymap bindings."
- (ergoemacs-debug-heading
- (format "Keymap Description: %s" (symbol-name keymap)))
- (ergoemacs-debug (substitute-command-keys (format "\\{%s}" (symbol-name
keymap)))))
+ (if (not (ignore-errors (symbolp (symbol-name keymap))))
+ (let ((temp-map keymap))
+ (ergoemacs-debug "%s" (substitute-command-keys "\\{temp-map}")))
+ (ergoemacs-debug-heading "%s"
+ (format "Keymap Description: %s" (symbol-name keymap)))
+ (ergoemacs-debug "%s" (substitute-command-keys (format "\\{%s}"
(symbol-name keymap))))))
(defvar ergoemacs-debug-heading-start-time (float-time))
(defvar ergoemacs-debug-heading-last-time (float-time))
diff --git a/ergoemacs-shortcuts.el b/ergoemacs-shortcuts.el
index dbf49d6..fb4339d 100644
--- a/ergoemacs-shortcuts.el
+++ b/ergoemacs-shortcuts.el
@@ -1794,7 +1794,8 @@ Setup C-c and C-x keys to be described properly.")
(when lookup
;; (ergoemacs-debug-heading "Remove ergoemacs from
`overriding-local-map'")
(setq overriding-local-map lookup)
- (ergoemacs-debug-keymap 'overriding-local-map))))
+ ;; (ergoemacs-debug-keymap 'overriding-local-map)
+ )))
((progn
(setq override-text-map (get-char-property (point) 'keymap))
(and (keymapp override-text-map)
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 4e0ce6a..02ab2dd 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -222,6 +222,30 @@
:type list))
"`ergoemacs-mode' fixed-map class")
+(defmethod ergoemacs-debug-obj ((obj ergoemacs-fixed-map))
+ (ergoemacs-debug-heading (oref obj object-name))
+ (with-slots (map
+ shortcut-map
+ no-shortcut-map
+ read-map
+ unbind-map) obj
+ (ergoemacs-debug "*** Read\n")
+ (ergoemacs-debug "%s\n" read-map)
+ (ergoemacs-debug-keymap read-map)
+ (ergoemacs-debug "*** Fixed\n")
+ (ergoemacs-debug "%s\n" map)
+ (ergoemacs-debug-keymap map)
+ (ergoemacs-debug "*** Shortcut\n")
+ (ergoemacs-debug "%s\n" shortcut-map)
+ (ergoemacs-debug-keymap shortcut-map)
+ (ergoemacs-debug "*** Shortcut Free\n")
+ (ergoemacs-debug "%s\n" no-shortcut-map)
+ (ergoemacs-debug-keymap no-shortcut-map)
+ (ergoemacs-debug "*** Unbind\n")
+ (ergoemacs-debug "%s\n" unbind-map)
+ (ergoemacs-debug-keymap unbind-map)
+ ))
+
(defmethod ergoemacs-define-map--shortcut-list ((obj ergoemacs-fixed-map)
key-vect def)
"Define KEY-VECT with DEF in slot shortcut-list for OBJ."
(with-slots (shortcut-list) obj
@@ -826,6 +850,19 @@ ergoemacs-get-keymaps-for-hook OBJ HOOK")
(defmethod ergoemacs-get-keymaps-for-hook ((obj
ergoemacs-theme-component-map-list) hook &optional ret)
(ergoemacs-get-hooks obj (concat "\\`" (regexp-quote (symbol-name hook))
"\\'") ret t))
+
+(defmethod ergoemacs-debug-obj ((obj ergoemacs-theme-component-map-list))
+ (with-slots (map-list object-name) obj
+ (ergoemacs-debug-obj (ergoemacs-get-fixed-map obj))
+ (ergoemacs-debug "* %s" object-name)
+ (dolist (map-obj map-list)
+ (when (ergoemacs-theme-component-maps-p map-obj)
+ (ergoemacs-debug-obj (ergoemacs-get-fixed-map map-obj)))))
+ (call-interactively 'ergoemacs-debug)
+ (org-hide-block-all))
+
+
+
(defvar ergoemacs-original-keys-to-shortcut-keys-regexp ""
"Regular expression of original keys that have shortcuts.")
- [elpa] 40/287: Remove shortcut override mode., (continued)
- [elpa] 40/287: Remove shortcut override mode., Matthew Fidler, 2014/07/02
- [elpa] 44/287: Suppress shortcuts, Matthew Fidler, 2014/07/02
- [elpa] 39/287: Starting applying keymaps to ergoemacs-emulation-mode-map-alist, Matthew Fidler, 2014/07/02
- [elpa] 45/287: Fix ergoemacs-describe-key, Matthew Fidler, 2014/07/02
- [elpa] 31/287: Created composite map list, Matthew Fidler, 2014/07/02
- [elpa] 42/287: Push shortcuts to the bottom. Should allow overrides., Matthew Fidler, 2014/07/02
- [elpa] 49/287: Bug fix for substitute-command-keys, Matthew Fidler, 2014/07/02
- [elpa] 43/287: Be more conservative with substituting key commands., Matthew Fidler, 2014/07/02
- [elpa] 46/287: Fix Issue #7, Matthew Fidler, 2014/07/02
- [elpa] 50/287: Another bug-fix for substitute-command-keys, Matthew Fidler, 2014/07/02
- [elpa] 52/287: Debugging ergoemacs-theme obect,
Matthew Fidler <=
- [elpa] 51/287: more substitute-command-keys fixes, Matthew Fidler, 2014/07/02
- [elpa] 58/287: Fix misplaced paren, Matthew Fidler, 2014/07/02
- [elpa] 57/287: Added basic variable/mode initialization routines., Matthew Fidler, 2014/07/02
- [elpa] 54/287: Maps seem correct now, Matthew Fidler, 2014/07/02
- [elpa] 48/287: Unstage the incompatible, Matthew Fidler, 2014/07/02
- [elpa] 55/287: Nicer theme debugging display, Matthew Fidler, 2014/07/02
- [elpa] 56/287: Better key replacements., Matthew Fidler, 2014/07/02
- [elpa] 64/287: Replace either M-x or <execute> with M-x code., Matthew Fidler, 2014/07/02
- [elpa] 63/287: Fixed mapvar issues., Matthew Fidler, 2014/07/02
- [elpa] 47/287: Stage some components, Matthew Fidler, 2014/07/02