Created
July 25, 2016 10:36
-
-
Save lislon/78d87b55054b50895871b968ecc36c6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my-count-maps (keymap) | |
| (let ((count 0)) | |
| (cl-loop for touple in (cdr keymap) | |
| ;; touple == (27 keymap (9 . ispell-complete-word)) | |
| do | |
| (progn | |
| (if (eq (car-safe (cdr-safe touple)) 'keymap) | |
| ;; descent into sub keymap | |
| (setq count (+ count | |
| (my-count-maps (cdr touple)))) | |
| ;; else condition | |
| (setq count (1+ count))) | |
| )) | |
| ;; return value | |
| count)) | |
| (message "total: %d" (my-count-maps org-mode-map)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment