.emacs-my
changeset 1468 0959998f028d
parent 1467 87b79df71e39
child 1469 93700ab0e491
equal deleted inserted replaced
1467:87b79df71e39 1468:0959998f028d
   156 Otherwise, return result of last form in BODY."
   156 Otherwise, return result of last form in BODY."
   157     (declare (debug t) (indent 0))
   157     (declare (debug t) (indent 0))
   158     `(condition-case nil (progn ,@body) (error nil)))
   158     `(condition-case nil (progn ,@body) (error nil)))
   159   )
   159   )
   160 
   160 
   161 (defun my-lookup-key (key)
   161 (defun my/lookup-key (key)
   162   "Search for KEY in all known keymaps."
   162   "Search for KEY in all known keymaps."
   163   (mapatoms (lambda (ob) (when (and (boundp ob) (keymapp (symbol-value ob)))
   163   (let (result)
   164                       (when (functionp (lookup-key (symbol-value ob) key))
   164     (mapatoms (lambda (ob) (when (and (boundp ob)
   165                         (message "%S" ob))))
   165                                  (keymapp (symbol-value ob))
   166             obarray))
   166                                  (functionp (lookup-key (symbol-value ob) key)))
       
   167                         (push ob result)))
       
   168               obarray)
       
   169     (remove-if-not 'identity result) ))
   167 
   170 
   168 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   169 (message "lisp, elisp")
   172 (message "lisp, elisp")
   170 
   173 
   171 (eval-when 'compile (require 'chistory))
   174 (eval-when 'compile (require 'chistory))