xwem-devel
[Top] [All Lists]

Re: XWEM kbd macro help please

From: Steve Youngs <steve@xxxxxxxx>
Subject: Re: XWEM kbd macro help please
Date: Thu, 20 Jan 2005 15:12:09 +1000
Organization: The XWEM Project
User-agent: Gnus/5.110003 (No Gnus v0.3) SXEmacs/22.1.1 (Aston Martin, linux)
* 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>---|

Attachment: pgpPV4IkZm925.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>