Commit graph

66 commits

Author SHA1 Message Date
Jonas Bernoulli
4004dde6ea Avoid positional arguments to define-minor-mode
Back in Emacs-21.1, `define-minor-mode' grew keyword arguments to
replace its old positional arguments.  Starting with Emacs-28.1
a warning will be omitted if positional arguments are still used.
2022-06-26 17:07:04 +02:00
Daniel Mendler
5ca7bc321d unbind-key: Ensure that keys are removed from the keymap
* The removal from the keymap is performed by bind-key--remove
* Use the same argument normalization as bind-key
2021-02-10 15:34:12 +01:00
Daniel Mendler
ec750952f4 bind-key: Use new symbols for kmapvar 2021-02-10 15:23:44 +01:00
Jimmy Yuen Ho Wong
950068809b Support keymap symbol in bind-key
GitHub-reference: fix https://github.com/jwiegley/use-package/issues/845
2020-07-08 04:46:56 +01:00
Jonas Bernoulli
8c7fa11a3f Fix typos 2019-11-06 13:49:46 +01:00
Andrew Schwartzmeyer
d2fec5e5e3 Document that remapping commands is supported with bind-key
Copyright-paperwork-exempt: yes
2018-04-30 09:55:27 -07:00
John Wiegley
a4d2e77961 bind-keys fixes related to
GitHub-reference: https://github.com/jwiegley/use-package/issues/482
2017-12-10 21:25:37 -08:00
John Wiegley
c272c6b56b Update some GPL version references
Fixes https://github.com/jwiegley/use-package/issues/563
2017-12-06 06:19:15 -08:00
John Wiegley
0a628a2767 Avoid using pcase and many other macros in macro-expanded forms
This is related to https://github.com/jwiegley/use-package/issues/550
2017-12-05 11:10:16 -08:00
John Wiegley
a090961f10 Fix bad interaction between bind-keys* and the :package keyword
Fixes https://github.com/jwiegley/use-package/issues/558
2017-12-05 10:29:51 -08:00
John Wiegley
277384d151 Add a note to bind-key on the usage of the KEYMAP argument
Fixes https://github.com/jwiegley/use-package/issues/542
2017-12-04 15:55:41 -08:00
John Wiegley
6470eaf3d5 Fix an argument process problem with bind-key
Fixes https://github.com/jwiegley/use-package/issues/334
2017-12-04 15:21:41 -08:00
John Wiegley
5f2b0cbe8f Allow keys to be bound to nil
Fixes https://github.com/jwiegley/use-package/issues/525
2017-11-29 21:44:02 -08:00
John Wiegley
8051c9f5cd Update version and copyright 2017-11-29 16:38:23 -08:00
John Wiegley
bff472ea80 Allow :bind ("C-c C-c" . (lambda () (ding))) and #'(lambda ...)
Fixes https://github.com/jwiegley/use-package/issues/333
Fixes https://github.com/jwiegley/use-package/issues/461
2017-11-29 16:37:03 -08:00
John Wiegley
2825987619 Print map keys in describe-personal-keybindings
Fixes https://github.com/jwiegley/use-package/issues/406
2017-11-28 20:58:04 -08:00
John Wiegley
606284e374 Repeating a bind no longer causes duplicates in personal-keybindings
Fixes https://github.com/jwiegley/use-package/issues/446
2017-11-28 20:52:29 -08:00
John Wiegley
6c35742992 Merge pull request from tarsius/outline
Support outline-minor-mode
GitHub-reference: https://github.com/jwiegley/use-package/issues/420
2016-12-18 15:20:42 -08:00
Jonas Bernoulli
75e0cd93c5 Delay decision whether to use eval-after-load until run-time
Just because a keymap variable is bound at macro-expansion-time
doesn't mean that it must be bound at run-time too.

Change `bind-keys-form', which is used by `bind-keys' and other
macros, to return a form which delays the decision on whether to
wrap the binding forms with `eval-after-load' until run-time.

Fixes https://github.com/jwiegley/use-package/issues/378.
2016-12-18 15:47:36 +01:00
Jonas Bernoulli
134ecb3c88 Support outline-minor-mode
In "use-package.el" prefix headings with ";;;" instead of just
";;".  In "bind-key.el" add the missing ";;; Code:" heading.
In both libraries set `outline-regexp' to an appropriate value.
2016-12-17 15:26:15 +01:00
John Wiegley
af65fbea63 :map no longer accepts lists; only eval-after-load if necessary
Fixes https://github.com/jwiegley/use-package/issues/324
2016-02-27 00:48:29 -08:00
John Wiegley
8e128b29f5 Merge pull request from ljos/master
Quote variable in bind-keys*
GitHub-reference: https://github.com/jwiegley/use-package/issues/325
2016-02-26 19:08:31 -05:00
John Wiegley
6ca19531bb Repair :map handling in bind-key.el
GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/324
2016-02-26 16:06:58 -08:00
Bjarte Johansen
b0b5cfbfb2 Quote variable in `bind-keys*'
* bind-key.el (bind-keys*): `override-global-map' needs to be quoted so
  the symbol is passed to `bind-keys-form' and not the value.
GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/323
2016-02-26 15:47:16 +00:00
John Wiegley
828563a756 Remove :bind-keymaps, and only apply :map bindings after load 2016-02-25 16:37:34 -08:00
John Wiegley
856e8ee245 Support multiples uses of :map with :bind
GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/121
2016-02-25 15:57:50 -08:00
John Wiegley
4593f178e3 Merge pull request from alezost/keymap-doc-fix
Handle the case when keymap has a broken documentation
GitHub-reference: https://github.com/jwiegley/use-package/issues/223
2016-02-25 18:19:58 -05:00
Nicolas Dudebout
32748d0657 Upper casing Cs corresponding to Ctrl
A number of Cs corresponding to Ctrl have been lower cased in comments in eb6b81dfe.
2016-02-05 21:40:34 -05:00
John Wiegley
3ce3b3a98c Add a missing comma 2016-01-12 07:58:06 -08:00
John Wiegley
b4ec5abad2 Add a PREDICATE option to bind-key, and :filter to `bind-keys' 2016-01-11 22:38:31 -08:00
John Wiegley
ed2e85e4a7 Use cl-mapcan rather than apply 'nconc; thanks wasamasa 2015-12-20 14:39:46 -08:00
Alex Kost
d81390f6de Handle the case when keymap has a broken documentation 2015-06-22 19:43:55 +03:00
John Wiegley
348bc57141 unbind-key now removes key from personal-keybindings
Fixes https://github.com/jwiegley/use-package/issues/74
2015-03-21 04:13:02 -05:00
John Wiegley
47586c714e Fix file headers 2015-03-21 03:57:09 -05:00
John Wiegley
53bb14cfb7 Add autoload stanzas to bind-key
Fixes https://github.com/jwiegley/use-package/issues/33
2015-03-21 03:50:51 -05:00
John Wiegley
8c00f108bf Change use-package to use bind-keys and bind-keys*
Fixes https://github.com/jwiegley/use-package/issues/129
2015-03-21 03:46:26 -05:00
John Wiegley
012c37d722 Change bind-key* behavior to mimic bind-keys*
Fixes https://github.com/jwiegley/use-package/issues/148
2015-03-21 03:32:10 -05:00
John Wiegley
029e46a874 Whitespace cleanups 2015-03-21 03:30:52 -05:00
John Wiegley
eb6b81dfec Allow :map in bind-keys to accept multiple maps
Fixes https://github.com/jwiegley/use-package/issues/129
2015-03-21 03:30:04 -05:00
Noam Postavsky
f5f4102ca1 get-binding-description: return keymap symbol
instead of "#<keymap>".
2015-03-19 11:25:18 -04:00
Thiago Barroso Perrotta
7db9b920df fix small typo (key > keymap) 2015-01-02 13:58:49 -02:00
Sean Allred
5a5aeca797 Do not quote lambda expressions
http://emacs.stackexchange.com/a/3596

Quoting lambda expressions is at best redundant and at worst
detrimental; this commit removes all use of the sharp-quote to reduce
confusion.
2014-12-19 23:12:47 -05:00
Bernard Hurley
471869269a bind-keys macro changed to allow prefix map to have a menu string 2014-06-20 05:45:51 +01:00
Noam Postavsky
b3e96443ad bind-key: cleanup 2014-05-31 15:21:44 -04:00
Noam Postavsky
de9f6814e7 bind-key: no vector keys in personal-keybindings
describe-personal-keybindings requires the key sequences to be stored as
strings.
2014-05-31 15:03:58 -04:00
Noam Postavsky
91b439c8e7 personal-keybindings: add docstring
fix typo in bind-key docstring
2014-05-31 15:03:58 -04:00
Alex Kost
c4ebcaa953 Add bind-keys* macro 2014-05-25 17:33:20 +04:00
Nicolas Richard
9ca3690b59 * bind-key.el (bind-key): don't eval key-name at macro expansion time 2014-04-14 19:59:01 +02:00
Noam Postavsky
01196c81ac bind-keys: bind directly to prefix-map
instead of constructing equivalent key sequence by string concatenation.
This allows specifying vector key sequences, as in bind-key (since
f0776c2aeb).
2014-04-14 00:03:36 -04:00
Noam Postavsky
869ff53ab9 bind-keys: ,@(when map (list map)) => map
Omitting map is same as passing nil.
2014-04-14 00:03:35 -04:00