unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: Elisp Tutorial dumb question -- but I thought I better doublecheck ??
Date: Wed, 25 Apr 2007 00:59:02 -0400	[thread overview]
Message-ID: <barmar-B20B6F.00590225042007@comcast.dca.giganews.com> (raw)
In-Reply-To: mailman.2465.1177432345.7795.help-gnu-emacs@gnu.org

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	other threads:[~2007-04-25  4:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2465.1177432345.7795.help-gnu-emacs@gnu.org>
2007-04-25  4:59 ` Barry Margolin [this message]
2007-04-25  6:14 ` Elisp Tutorial dumb question -- but I thought I better doublecheck ?? Tim X
2007-04-25  8:26   ` Maciej Katafiasz
     [not found]   ` <mailman.2497.1177490263.7795.help-gnu-emacs@gnu.org>
2007-04-25 11:43     ` Tim X
2007-04-24 16:23 William Case
2007-04-25  8:20 ` Maciej Katafiasz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=barmar-B20B6F.00590225042007@comcast.dca.giganews.com \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).