lisp help w/ x-cycle



Hello.

I just started using sawfish and I'm trying to get it to behave the way
I want.  One of the things I'd like to do is use something like the
jump-or-exec.jl script on the website, but add cycling to it.  E.g.,
bind a key to cycle through emacs windows if any exist, otherwise start
one.  From my poking around it looks like a reasonable way to go would
be to piggy-back off of the x-cycle code, but I don't really understand
everything x-cycle is doing, and so far my attempts haven't worked.

So, for example, I tried adding this to x-cycle:

  (define (cycle-windows windows #!optional step)
    "Simply cycle through the given list of windows."
    (when windows
      (let ((i (or step +1)))
	(if (fluid x-cycle-active)
	    (cycle-next windows i)
	  (cycle-begin windows i)))))

Presumably this failed because x-cycle is doing some magic to keep track
of whether the modifier key is kept depressed, and this steps all over
that.

So does anyone have any suggestions?  Is it worth it to try and
understand all the x-cycle stuff (most of which I don't care about
anyway), or should I just write my own cycling code?

-- 
Jeremy Hankins <nowan nowan org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]