xwem-devel
[Top] [All Lists]

macro help please -- `with-xwem-frame'

From: Steve Youngs <steve@xxxxxxxx>
Subject: macro help please -- `with-xwem-frame'
Date: Mon, 03 Oct 2005 15:42:35 +1000
Organization: The XWEM Project
User-agent: Gnus/5.110004 (No Gnus v0.4) SXEmacs/22.1.3 (BMW, linux)
This is close to what I'm looking for, but not quite there...

(defmacro with-xwem-frame (frame &rest body)
  "Execute BODY in xwem FRAME.

XWEM makes FRAME the current frame, executes each form in BODY under a
`progn' and then returns back to the originally focused frame."
  `(when (xwem-frame-p ,frame)
     (xwem-select-frame ,frame)
     (progn
       ,@body
       (xwem-magic-to-go-back-to-frame-before-we-called-this-macro))))

Ultimately, what I'd like to be able to do with this is to completely
automate my start up.  Starting clients in specific frames (as long as
they don't exist already).

Combining things like `xwem-desktop-{save,load}', and xwem-agent is
great.  But it doesn't do a total job.  For example, all of the
SXEmacs frames that I have don't get restarted from the agent.  Also
the agent is no good from a "cold" start (ie running startx from the
console)... it only comes into its own once X is already up.

I also want to keep that macro as general as possible, because I'm
sure it'd be very useful for other things apart from starting
clients in specific frames. :-)


-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                        In space,                         |
|             No one can hear you rip a stinky             |
|---------------------------------------<steve@xxxxxxxx>---|

Attachment: pgptujPfsqGTD.pgp
Description: PGP signature

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