emacs-devel
[Top][All Lists]
Advanced

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

Re: EWMH package, please review.


From: David Kastrup
Subject: Re: EWMH package, please review.
Date: 13 Oct 2003 09:54:41 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Jan D." <address@hidden> writes:

> >> ;;; Code:
> >>
> >> (defun x-ewmh-send (arg hint frame &optional hint2)
> >>   "Send a client message to change an extended window manager hint.
> >>
> >>   (let* ((eff-arg (if (null arg) 0 (prefix-numeric-value arg)))
> >
> > This is simpler:
> >
> >   (setq arg (if (null arg) 0 (prefix-numeric-value arg)))
> >   (let ((action ...use ARG instead of EFF-ARG...))
> 
> I was told to avoid setq when I learned lisp :-).

And using setq on variables not supposed to be global and not having
a local binding either is quite a bad practice.  In this case,
however, arg already _has_ a local binding from the defun.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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