Debian Codegraph @

README.md

raw ◀ ▶
1 Debian patch touch this file
1 # discover-my-major
2
3 Discover key bindings and descriptions for commands defined by a buffer's major and minor modes.
4
5 The command is inspired by [discover.el](https://github.com/mickeynp/discover.el) and also uses the [makey library](https://github.com/mickeynp/makey). I thought, "Hey! Why not parse the information about the major mode bindings somehow and display that like `discover.el` does..."
6
7 The output is pretty bare bones and not optimized but it seems to work already quite well for most modes:
8
9 ## Installation
10
11 ### quelpa
12
13 `quelpa` is at https://github.com/quelpa/quelpa
14
15 ```lisp
16 (quelpa '(discover-my-major :fetcher git :url "https://framagit.org/steckerhalter/discover-my-major.git"))
17 ```
18
19 ### MELPA
20
21 Packages are available in [MELPA](http://melpa.milkbox.net/).
22
23 ### el-get
24
25 ```lisp
26 (:name discover-my-major
27 :type git
28 :url "https://framagit.org/steckerhalter/discover-my-major")
29 ```
30
31 ## Usage
32
33 In any mode you should be able to summon the popup to discover the commands defined by the current buffer's `major-mode`, by invoking `M-x discover-my-major`; and for any of the buffer's active minor modes, by invoking `M-x discover-my-mode`. Each of these commands which will show you a list of key bindings defined by that mode in the current buffer along with their descriptions.
34
35 The recommended key binding is `C-h C-m`, but be aware that by default `C-h C-m` is bound to `view-order-manuals`. If the `help+` package is installed, this key is bound to `help-on-click/key` by default.
36
37 ```lisp
38 (global-set-key (kbd "C-h C-m") 'discover-my-major)
39 (global-set-key (kbd "C-h M-m") 'discover-my-mode)
40 ```
41
42 Or alternatively, to avoid overriding `C-h C-m`:
43
44 ```lisp
45 (global-set-key (kbd "C-h M-m") 'discover-my-major)
46 (global-set-key (kbd "C-h M-S-M") 'discover-my-mode)
47 ```