|
@@ -1,6 +1,12 @@
|
|
|
* Description
|
|
|
This is a function to list current keybindings and do an occur match.
|
|
|
|
|
|
+ Assuming
|
|
|
+
|
|
|
+ =(global-set-key (kbd "C-h b") 'gmjOccurBindings)=
|
|
|
+
|
|
|
+ Run with C-u C-h C-b to search bindings.
|
|
|
+
|
|
|
Why? Usually when I list describe-bindings (C-h b) the next thing I
|
|
|
do is switch to the buffer and search for the command I'm looking
|
|
|
for. appropos-command (C-h a) comes close, but I find the output
|
|
@@ -34,18 +40,20 @@
|
|
|
|
|
|
* Keybinding
|
|
|
#+begin_src emacs-lisp
|
|
|
- (global-set-key (kbd "C-h b") 'gmjOccurBindings)
|
|
|
+ (global-set-key (kbd "C-h b") 'gmjOccurBindings)
|
|
|
#+end_src
|
|
|
|
|
|
#+RESULTS:
|
|
|
: gmjOccurBindings
|
|
|
|
|
|
+
|
|
|
* History
|
|
|
- George Jones, 2016-08-28
|
|
|
+ - George Jones, 2016-08-28 - initial
|
|
|
+ - George Jones, 2022-11-15 - cleanup
|
|
|
|
|
|
* Code
|
|
|
|
|
|
- #+BEGIN_SRC emacs-lisp :exports code
|
|
|
+ #+BEGIN_SRC emacs-lisp :exports code
|
|
|
(defun gmjOccurBindings (arg)
|
|
|
"This is a function to list current keybindings and do an occur match
|
|
|
|
|
@@ -57,7 +65,6 @@
|
|
|
"
|
|
|
(interactive "p")
|
|
|
(progn
|
|
|
- (message "in gmjOccurBindings")
|
|
|
|
|
|
; if arg is 1, just call describe-bindings
|
|
|
(if (= arg 1)
|
|
@@ -67,7 +74,6 @@
|
|
|
(if (= arg 4)
|
|
|
(progn
|
|
|
(setq occurString (read-string (format "search bindnigs for: ") nil nil ""))
|
|
|
- (message (concat "occurString is " occurString))
|
|
|
(describe-bindings)
|
|
|
(switch-to-buffer-other-window "*Help*")
|
|
|
(if (not (equal occurString ""))
|
|
@@ -78,10 +84,7 @@
|
|
|
)
|
|
|
)
|
|
|
|
|
|
- #+END_SRC
|
|
|
+ #+END_SRC
|
|
|
|
|
|
#+RESULTS:
|
|
|
: gmjOccurBindings
|
|
|
-
|
|
|
-*
|
|
|
-
|