From: Timothy J. Burr
Subject: Novice needs help with lisp expression
Date: 
Message-ID: <1992Jul4.003557.3017@seas.gwu.edu>
Hi,

I'm trying to troubleshoot a lisp function in emacs.  I don't have
much experience in lisp and I was hoping I could get some help
with a certain expression.

Could someone tell me what the following expression does?

(let (pack 20) next-files files-text done len) .... )

There is no definition of pack as a function that I can find in
any of the emacs lisp libraries or in any of the lisp books that
I have looked in.  In the larger defun that this let is part of
there is no instance of next-files, files-text, done or len - i.e.,
the first instance of these are in this let.  I think let's purpose
anyway is to scope these variables to its defined block.

If you could explain the meaning behind this expression and perhaps
tell me where pack is defined (if its not acting as a variable in
this expression), I would be very appreciative.

Tim

From: Kenrick Mock
Subject: Re: Novice needs help with lisp expression
Date: 
Message-ID: <15021@ucdavis.ucdavis.edu>
In article <····················@seas.gwu.edu> ····@seas.gwu.edu writes:
>
>Could someone tell me what the following expression does?
>
>(let (pack 20) next-files files-text done len) .... )
>

I think it will cause a Lisp crash :)  The format for let is:

(let
  (
   (somevar1 someval1)
   (somevar2 someval2)
   ...
   (somevarN somevalN)
  )
  (some-expr)
  ...
  (some-expr)
)

In the expression you've got, there should be additional parentheses
around the variables, such as:

(let ((pack 20) (next-files nil) .. ) (expr) ... (expr))

>
>If you could explain the meaning behind this expression and perhaps
>tell me where pack is defined (if its not acting as a variable in
>this expression), I would be very appreciative.
>

It looks like all those things (pack, file, etc.) are variables...

-- 
------------------------------------------------------------------------------
GEnie : K.MOCK     			Net : ····@madrone.eecs.ucdavis.edu
"Don't worry about the world ending today, it's already tomorrow in
 Australia..."  					      - CMS
From: David Loewenstern
Subject: Re: Novice needs help with lisp expression
Date: 
Message-ID: <LOEWENST.92Jul4164035@blaze.rutgers.edu>
In article <·····@ucdavis.ucdavis.edu> ····@madrone.eecs.ucdavis.edu (Kenrick Mock) writes:

}In article <····················@seas.gwu.edu> ····@seas.gwu.edu writes:
}>
}>Could someone tell me what the following expression does?
}>
}>(let (pack 20) next-files files-text done len) .... )
}>
} I think it will cause a Lisp crash :)  The format for let is:
} (let
}  (
}   (somevar1 someval1)
}   (somevar2 someval2)
}   ...
}   (somevarN somevalN)
}  )
}  (some-expr)
}  ...
}  (some-expr)

})
} In the expression you've got, there should be additional parentheses
}around the variables, such as:
} (let ((pack 20) (next-files nil) .. ) (expr) ... (expr))

More likely, ····@seas.gwu.edu forgot one left parenthesis.
The expression
  (let ((pack 20) next-files files-text done len) .... )
is perfectly legal.  It defines the variables pack, next-files,
files-text, done, and len, with pack initialized to 20 and the others 
initialized to NIL.

These opinions are shareware.  If you like the product,
please send your $0.02 to
               David Loewenstern
   <·····@homxc.att.com> || <········@paul.rutgers.edu>