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

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

Re: Elisp Tutorial dumb question -- but I thought I better doublecheck ?


From: Barry Margolin
Subject: Re: Elisp Tutorial dumb question -- but I thought I better doublecheck ??
Date: Wed, 25 Apr 2007 00:59:02 -0400
User-agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X)

In article <mailman.2465.1177432345.7795.help-gnu-emacs@gnu.org>,
 William Case <billlinux@rogers.com> wrote:

> Hi;
> 
> I am working my way through the elisp tutorial
> at 
> :http://www.linuxselfhelp.com/gnu/emacs-lisp-intro/html_mono/emacs-lisp-intro.
> html#Writing%20Defuns
> 
> Section 3.3 on defuns gives an algorithm for the basic defun as:
> 
> defun
> (defun function-name (arguments ... )
> "optional-documentation ..."
> (interactive argument-passing-info)
> body ... )  
> 
> and later gives an algorithm for the lambda anonymous function as:
> C.4.3 A lambda Expression: Useful Anonymity
> 
> (lambda (arg-variables...)
>   [documentation-string]
>   [interactive-declaration]
>   body-forms...)
> 
> The differences seem trivial, but can I re-write the lambda algorithm in
> terms of the defun algorithm for myself such that:
> 
> lambda
> (lambda (arguments ... )
>       "optional-documentation ..."
>       (interactive argument-passing-info)
>       body ... )   
> 
> or would I be missing some significant difference ?

Are you asking whether [documentation-string] is the same as 
"optional-documentation ..."?  Yes, they are just different notations 
for the same thing.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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