1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-01 03:11:09 -08:00
Commit graph

420 commits

Author SHA1 Message Date
justbur
0e87f61d72 Work on handling prefix args better 2015-12-04 15:34:17 -05:00
justbur
b3b41792e8 Make C-h command hint respect C-h-map commands 2015-12-04 14:21:17 -05:00
justbur
2c5bb54b58 Merge branch 'master' of https://github.com/justbur/emacs-which-key 2015-12-03 20:51:52 -05:00
justbur
4fb75fa6ef Don't abort key seq after unbound key in C-h-map
Allows to recover from accidentally pressing C-h.

This commit also fixes some echo area problems that become apprent after
introducing the C-h-map stuff
2015-12-03 20:49:43 -05:00
Justin Burkett
baee0db96e Clarify C-h commands description in readme 2015-12-03 12:10:47 -05:00
justbur
318f9de6a9 Fix top-level note and satisfy compiler 2015-12-03 11:15:19 -05:00
justbur
388c00736a Add C-h commands to what's new in readme
Still need to update the rest of the content
2015-12-03 08:44:14 -05:00
justbur
5ebbe69cfb Fix note on right and add abort keys 2015-12-03 08:36:13 -05:00
justbur
9846929ddf Fix undo and timer usage 2015-12-03 08:10:50 -05:00
justbur
b5ec6f8f8d Introduce C-h command dispatch function
Replace role of show-next-page with C-h-dispatch which immediately reads
a key and calls a command from C-h-map, which may be one of several
paging commands, a command to undo the last keypress, or a command to
directly access describe-prefix-bindings.

This commit does not include documenting these changes in the readme.

Note that several options become deprecated here as they no longer have
the same (if any effect).
2015-12-02 22:42:02 -05:00
justbur
3327e9cdf2 Remove dependencies from README 2015-12-01 11:53:02 -05:00
justbur
db97a29be5 Cleanup make-text-button call 2015-11-30 20:58:48 -05:00
justbur
7a30f4d443 Fix return value problem for make-text-button
Apparently in versions before 24.5 the return value was not always the
button itself when a string was used as the argument
2015-11-30 18:43:09 -05:00
justbur
d4b4bad88a Merge branch 'grammati' 2015-11-30 13:47:27 -05:00
justbur
70a4716879 Use safe version of string-width 2015-11-30 13:30:37 -05:00
justbur
2f4c5d8609 Use key-description for canonical keys
This takes the idea in the previous commit and translates the
representations of keys in the alists to be the output of
key-description. The issue is that `M-x` for example has two
representations with listify-key-sequence, but only one (it seems) from
key-description.
2015-11-30 11:23:50 -05:00
Chris Perkins
ead6b70fd0 Display prefix names in terminal-mode
When running emacs in a terminal (or at least, in iTerm), keys are not
passed through to emacs the same way that they are in graphical mode.

For example, M-m (important in spacemacs) is the key-sequence
`[134217837]` in graphical emacs, but `[27 109]` ("ESC m") in terminal.

The variable `which-key-prefix-name-alst` only has a mapping for the
former (the 134217837), and so the names of submenus all show up as
"+prefix", limiting discoverability.

This commit converts the key sequence into a canonical form (eg:
converts `[27 109]` into `[134217837]`) in
`which-key--maybe-replace-prefix-name`, so that the prefixes are found.

I think some work is probably needed for
`which-key-prefix-title-alist` too, but I'm not entirely sure what
that's used for, so I didn't mess with it.
2015-11-28 11:15:21 -07:00
justbur
2d0b1463ad Add README note about last commit 2015-11-20 15:40:16 -05:00
justbur
55384945c7 Show docstring on hover in echo area for commands 2015-11-20 15:28:24 -05:00
justbur
3fceb99ee4 Fix mistake in reverting defaults
Ref 9dd0ceaaab

Accidentally changed the side window location instead of the show-prefix
one.
2015-11-20 06:35:49 -05:00
Justin Burkett
b61c7ad564 Merge pull request #87 from cute-jumper/master
Fix the value of `which-key-side-window-location'
2015-11-20 06:31:17 -05:00
Junpeng Qiu
62344270c5 Fix the value of `which-key-side-window-location' 2015-11-19 22:52:43 -05:00
justbur
cd6b3c5e99 Check for nil as a binding in previous commit 2015-11-18 22:04:29 -05:00
justbur
c6abc78b58 Provide alternate prefix-title for echo area 2015-11-18 22:00:14 -05:00
justbur
6b5ca75b64 Forgot line in last commit 2015-11-18 21:48:27 -05:00
justbur
9dd0ceaaab Revert change in default of side-window-bottom
Not happy with the look of it yet, even though it's probably better to
avoid the echo area
2015-11-18 21:44:11 -05:00
justbur
841f461b22 Automatically close popup when prefix goes away
It was necessary to hit C-g twice to close the popup before this change.
2015-11-18 20:57:51 -05:00
justbur
279b318cc6 Provide alternative for prefix-title
If echo-keystrokes is non nil, we're showing in the bottom window, and
the prefix is shown in the top or bottom line, there's not much reason
to show the prefix again since it's so close to the echo area.
2015-11-18 20:24:23 -05:00
justbur
24839e665d Fix spacing in last commit 2015-11-18 14:58:35 -05:00
justbur
8f9bd782f7 Mention new show-prefix option and format README 2015-11-18 14:57:01 -05:00
justbur
cf8052d6ca Add show-prfx 'bottom and change top-level msg
'bottom is a "safer" default because it's impossible to control the echo
area completely, so the message gets wiped out occasionally.

Use prefix-titles for the top-level bindings message, since top-level is
not really a key
2015-11-18 13:58:23 -05:00
justbur
6cb95565d6 Ignore key translations only at top-level
C-x 8 is a valid place to put translations for example
2015-11-18 10:52:59 -05:00
justbur
fe5be11e6e Option to remove default unicode characters 2015-11-18 10:21:49 -05:00
Justin Burkett
d694bbe4c1 Merge pull request #86 from syohex/byte-compile-warnings
Fix byte compile warnings
2015-11-18 05:26:06 -05:00
Syohei YOSHIDA
3af2f25803 Use bound-and-true-p for byte compile warning 2015-11-18 12:55:56 +09:00
Syohei YOSHIDA
e888ee885a Move definition position for byte-compile warning 2015-11-18 12:54:31 +09:00
justbur
ef44d0771a Sort character ranges properly
Fix #85
2015-11-17 21:50:55 -05:00
justbur
aa60a2364e Make special-key matching case sensitive 2015-11-16 22:31:10 -05:00
justbur
25bd62aa49 Refactor sorting functions and move fn keys up 2015-11-16 22:13:16 -05:00
justbur
0bddd2db10 Silence warnings for obsolete function 2015-11-16 22:02:18 -05:00
justbur
39fb658dbf Turn on case-sensitivity in replacements
Should avoid situations like #84
2015-11-16 21:57:59 -05:00
justbur
b0991a8a91 Satisfy compiler 2015-11-16 20:13:58 -05:00
justbur
7068ebd224 Bring in new describe-buffer-bindings parsing func
based on similar function in helm-descbinds. This parses the output of
describe-buffer-bindings line by line, and is easier to follow and
manipulate than the previous one that uses complicated regexp
expressions.
2015-11-16 20:04:13 -05:00
justbur
b0f9f580f3 Mention show-top-level in the README 2015-11-15 21:39:33 -05:00
justbur
b2c7d25dde Minor stylistic changes to previous pr 2015-11-13 13:09:37 -05:00
Iqbal Ansari
d3fe7b2e2a Ignore self-insert-command bindings 2015-11-13 22:40:05 +05:30
Iqbal Ansari
25d006eac1 Include keybindings of the form 'a .. z' in which key popup 2015-11-13 22:40:05 +05:30
Iqbal Ansari
6aec4bd9f4 Use set-temporary-overlay-map to setup paging keys for toplevel popup 2015-11-13 22:40:05 +05:30
Iqbal Ansari
26ca465bd1 Manually flush headings for keybindings 2015-11-13 22:40:05 +05:30
Iqbal Ansari
cdd2934d0d Allow function key bindings to be displayed in toplevel help 2015-11-13 22:40:05 +05:30