On 12Sep2012 19:37, Lewis Pike <[email protected]> wrote:
| Is it possible to bind multiple functions to a single key such that
| successive keypresses cycle through the functions?  I'd like to be
| able to use the control-l key to first execute <current-middle>, then
| if it is pressed again, to execute <current-top> and finally, if
| pressed a third time, execute <current-bottom>. 
| 
| For emacs users, the functionality I'm looking for would be similar to
| the Control-l key in emacs which executes the recenter-top-bottom
| command.

You could bind it to a macro that performas the current operation and
then rebinds it to the next one. I'd put each macro in a file and have
the macro source the next file in the cycle.

Untested suggestion:

In mail muttrc:

  source ~/.mutt-ctrl-L-1

In ~/.mutt-ctrl-L-1:

  macro index \CL '<current-middle>:source ~/.mutt-ctrl-L-2<enter>'

and so forth in .mutt-ctrl-L-2 and 3.

Cheers,
-- 
Cameron Simpson <[email protected]>

Reply via email to