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

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



reply via email to

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