summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--TODO5
-rw-r--r--doc/ratpoison.texi3
-rw-r--r--src/actions.c9
4 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d6c7ebb..34a0a07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,11 @@
* src/input.c (update_input_window): Draw a cheap-o cursor
+2001-09-12 Gergely Nagy <algernon@debian.org>
+
+ * src/actions.c (cmd_bind): binding an empty string to a key will
+ unbind the key.
+
2001-09-09 shawn <sabetts@diggin.lamenet.tmp>
* src/conf.h (MAXSIZE_WINDOWS_ARE_TRANSIENTS): defined
diff --git a/TODO b/TODO
index 34da8d0..ab30a44 100644
--- a/TODO
+++ b/TODO
@@ -1,15 +1,12 @@
-*- outline -*-
* command stuff
-** binding an empty string should wipe out old binding
-ryan
-
** general argument parsing strategy
ryan
** return the current setting for the def* command suite
When in non-interactive mode, so scripts that need to change them can
-change them back when they're done.
+change them back when they're done. Low priority.
* implement these screen commands (see the screen info for documentation):
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index 68755e5..3e6a30b 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -306,6 +306,9 @@ restart ratpoison:
: bind R exec ratpoison --restart
@end example
+If no command is specified then bind works exactly like @command{unbind},
+unbinding the key.
+
@item clock
Show current time. Disappears after 5 seconds, like all other info bars.
In the default setup, the @kbd{C-t a} keystroke is bound to this command.
diff --git a/src/actions.c b/src/actions.c
index e3101a6..a38c9e7 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -367,7 +367,7 @@ cmd_bind (int interactive, void *data)
if (!data)
{
- message (" bind: two arguments required ");
+ message (" bind: at least one argument required ");
return NULL;
}
@@ -382,11 +382,14 @@ cmd_bind (int interactive, void *data)
}
if (!keydesc)
- message (" bind: two arguments required ");
+ message (" bind: at least one argument required ");
else
{
if (!cmd || !*cmd)
- message (" bind: need a command to bind to key ");
+ {
+ /* If no comand is specified, then unbind the key. */
+ cmd_unbind (interactive, keydesc);
+ }
else
{
struct rp_key *key = parse_keydesc (keydesc);