Re: quotation question + good lisp doc
- From: Teika Kazura <teika lavabit com>
- To: sawfish-list gnome org
- Subject: Re: quotation question + good lisp doc
- Date: Sat, 20 Feb 2010 14:54:09 +0900 (JST)
Chris, are you going to replace the current jump-or-exec
with cycle-or-exec? If so, I won't touch jump-or-exec.jl for a while.
It seems good.
But the *filename* jump-or-exec.jl is really good, so we should't
throw it away.
I'll work on it later, waiting my class enhancements, but what you
want must look like this:
------------------------------------------------------------------------
(define (cycle-or-exec re prog #!key name match-class)
(let (forward-name backward-name)
(when (stringp prog)
(setq name prog))
(if name
(prog
(setq forward-name (concat "cycle-" name))
(setq backward-name (concat forward-name "-backwards")))
(setq forward-name
(concat "cycle-" (closure-name prog)))
(setq backward-name
(concat forward-name "-backwards")))
(if match-class
(define-cycle-command-pair
forward-name backward-name
(cycle-or-exec-backend (filter-windows-by-class re) prog))
(define-cycle-command-pair
forward-name backward-name
(cycle-or-exec-backend (filter-windows-by-name re) prog)))))
------------------------------------------------------------------------
This is closer to the original one. Here, 'intern' is not necessary.
(I learned what's 'intern'. :)
1. 'prog' can be string or function, as original.
2. If 'name' is non-nil, it's used as the name for command.
3. Else, the function name is used for command.
On Sat, 13 Feb 2010 21:10:20 +0100, Christopher Roy Bratusek wrote:
> 2. Someone got a link to a good lisp doc (got holidays next week, so
> finally some time to get more familar with something different when
> python).
It may be trivial, but it's good to ask at ML, too, if you come across
a lisp riddle. If you don't know something, many don't, so asking here
helps to share knowledge. :)
Regards,
Teika (Teika kazura)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]