idlwave-action-and-binding

idlwave-action-and-binding is a compiled Lisp function in `idlwave.el'.

(idlwave-action-and-binding KEY CMD &optional SELECT)

KEY and CMD are made into a key binding and an indent action.
KEY is a string - same as for the `define-key' function. CMD is a
function of no arguments or a list to be evaluated. CMD is bound to
KEY in `idlwave-mode-map' by defining an anonymous function calling
`self-insert-command' followed by CMD. If KEY contains more than one
character a binding will only be set if SELECT is 'both.

(KEY . CMD) is also placed in the `idlwave-indent-expand-table',
replacing any previous value for KEY. If a binding is not set then it
will instead be placed in `idlwave-indent-action-table'.

If the optional argument SELECT is nil then an action and binding are
created. If SELECT is 'noaction, then a binding is always set and no
action is created. If SELECT is 'both then an action and binding
will both be created even if KEY contains more than one character.
Otherwise, if SELECT is non-nil then only an action is created.

Some examples:
No spaces before and 1 after a comma
(idlwave-action-and-binding "," '(idlwave-surround 0 1))
A minimum of 1 space before and after `=' (see `idlwave-expand-equal').
(idlwave-action-and-binding "=" '(idlwave-expand-equal -1 -1))
Capitalize system variables - action only
(idlwave-action-and-binding idlwave-sysvar '(capitalize-word 1) t)