[Top][All Lists]

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

Re: Building Emacs overflowed pure space

From: Richard Stallman
Subject: Re: Building Emacs overflowed pure space
Date: Thu, 20 Jul 2006 14:16:37 -0400

    Why isn't the following version just as good?

    (defmacro dolist (spec &rest body)
      "Loop over a list.
    Evaluate BODY with VAR bound to each car from LIST, in turn.
    Then evaluate RESULT to get return value, default nil.

    \(fn (VAR LIST [RESULT]) BODY...)"
      (declare (indent 1) (debug ((symbolp form &optional form) body)))
      `(let ((--dolist-temp-- ,(nth 1 spec))
             ,(car spec))
         (while --dolist-temp--

The only flaw of this is that BODY can see the variable --dolist-temp--.
Practically speaking, it may not ever matter; users are unlikely to
use that variable by accident.  However, it is cleaner to prevent that
by using an uninterned symbol, assuming we can get rid of the current
inefficiency that that causes.

reply via email to

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