* Steve Youngs <steve@xxxxxxxx> writes:
> But I want to save this very important macro across XWEM sessions.
> And this is where I get lost. What are the XWEM equivalents of:
> `name-last-kbd-macro'
> `assign-last-kbd-macro-to-key'
> `insert-kbd-macro'
To followup to myself, this solves my immediate problems...
(define-xwem-command xwem-assign-last-kbd-macro-to-key (key)
"Assign to a key sequence the last keyboard macro defined.
Argument KEY is anything acceptable to `define-key'.."
(xwem-interactive
(list (read-key-sequence "Key sequence for last kbd macro: ")))
(or xwem-keymacro-last-kbd-macro
(error "No keyboard macro defined"))
(define-key xwem-user-macros-map key xwem-keymacro-last-kbd-macro))
And then xwem-desktop-(save|load) handles the rest.
This looks OK for simplistic keyboard macros, but I'd imagine it would
get quite untidy for anything complex.
I'm working on `xwem-name-last-kbd-macro' and
`xwem-insert-kbd-macro'. :-)
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| In space, |
| No one can hear you rip a stinky |
|---------------------------------------<steve@xxxxxxxx>---|
pgpPV4IkZm925.pgp
Description: PGP signature
|