gb at clozure.com
Thu Jun 25 02:42:00 EDT 2009
On Wed, 24 Jun 2009, Ron Garret wrote:
> Pressing TAB indents the current line, but not the current region (if
> there's one selected. If I do this:
> (hi:bind-key "Indent Region" #k"tab")
> then TAB indents the current region if one is selected, but not the
> current line if one is not.
> Is there any way to get TAB to do both depending on whether or not
> there is a selection?
Sure: define a command that does both, depending on whether or not
there's a selection, then bind #k"tab" to that command.
> And while I'm at it...
> is there a way to get a list of all the current keybindings, and a
> list of all of the commands available to be bound to key events?
C-h is actually somehat useful (sometimes). (Try "C-h h" to see what
options C-h supports.)
Note that I'm not trying to claim that C-h is anything more than "somewhat
useful, sometimes"; it's a few notches above "completely useless" and
several notches below "as useful as it could be."
C-h m describes all of the key bindings available in a named "mode"; it
doesn't describe bindings that're common to all modes. (I don't know
of a way to do that via C-h.)
If all else fails, most (all ?) of the calls to HI:BIND-KEY that establish
key bindings are in "ccl:cocoa-ide;hemlock;src;bindings.lisp".
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel