gnu-emacs-sources
[Top][All Lists]
Advanced

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

Re: wajig.el 0.3 --- an interface for wajig


From: William Xu
Subject: Re: wajig.el 0.3 --- an interface for wajig
Date: 24 Feb 2006 05:49:51 -0800
User-agent: G2/0.2

Thien-Thi Nguyen <address@hidden> writes:

> "William Xu" <address@hidden> writes:
>
>>    ;; FIXME: Is this the correct way, using `eval'?
>>    (eval `(define-wajig-command ,command)))
>>    (eval `(define-wajig-command ,command (pkg))))
>
> if it works, it's not incorrect.

Yup. It does work. I've used this package for some time.

> as for style... personally, i would rewrite it as a function, w/
> prefix "wajig-".  it's true that a macro may look cleaner in ~/.emacs,
> but then you have to remember that it's a macro, etc.  geezers like me
> hate that.

Well, considering there are dozens of wajig commands, most of which
could be defined by a similar definition body, it would be too crazy to
`defun' them one by one...

The problem here is how to map a macro to a list, which i've been
thinking about all the time. Seems i'm forced to use an explicit
`eval'. Things is a bit different in scsh, though. In scsh, i don't
need that explicit `eval', e.g.,

    (map (lambda (cmd) (run (,cmd))) '(ls pwd))

This works quite nicely, simply wrapping around a macro(run, here) with
a lambda function. 

---
William



reply via email to

[Prev in Thread] Current Thread [Next in Thread]