all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: "paul r" <paul.r.ml@gmail.com>
Cc: Miles Bader <miles@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: lexbind
Date: Sat, 15 Mar 2008 07:10:09 +0900	[thread overview]
Message-ID: <87tzj9rm7y.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <e30f0f320803141003u496cb8b4ud0a2029512c354b7@mail.gmail.com>

paul r writes:

 > At the end, what is the "officially recommended" way of defining a
 > local function ?
 >     -   (labels ...) , a macro  coming from cl-macs ?
 > or - (let ((fct (lambda ...))) .) which is not a macro, but is
 > syntaxly less convenient to manipulate?
 > Thanks for your light.

It depends on where you are working.  If you're doing something deep
in the core, then you do not want to require cl-macs (there are ways
to avoid pulling it into the build, but they're fragile and ugly), and
the (let ((fct ...)) ... (funcall fct ...)) idiom may be preferred.

Otherwise, it's a matter of style, and since Stefan says both are OK,
it's up to you.  I've not tried the latter (I usually just use flet
which is a bad habit from my early days, labels is usually more
appropriate for my use), but the `(funcall fct ...)' idiom might be
useful to remind the programmer later that `fct' is local, not global.

Of course if the function is so big that you forget that while reading
it, maybe something else is wrong with the code. :-)





  parent reply	other threads:[~2008-03-14 22:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02 17:25 lexbind Richard Stallman
2008-03-02 19:27 ` lexbind Stefan Monnier
2008-03-03 18:26   ` lexbind Richard Stallman
2008-03-03 21:43     ` lexbind Stefan Monnier
2008-03-03 22:07       ` lexbind David Kastrup
2008-03-03 22:43         ` lexbind Stefan Monnier
2008-03-03 23:09           ` lexbind David Kastrup
2008-03-03 23:31             ` lexbind Miles Bader
2008-03-03 22:18       ` lexbind paul r
2008-03-03 22:45         ` lexbind Stefan Monnier
2008-03-04 10:12           ` lexbind paul r
2008-03-04 15:36             ` lexbind Miles Bader
2008-03-04 16:29               ` lexbind paul r
2008-03-04 23:04                 ` lexbind Stephen J. Turnbull
2008-03-05  2:38                   ` lexbind Miles Bader
2008-03-05  5:08                     ` lexbind Dan Nicolaescu
2008-03-05  5:58                     ` lexbind Stephen J. Turnbull
2008-03-14 17:03                       ` lexbind paul r
2008-03-14 19:00                         ` lexbind Stefan Monnier
2008-03-14 22:10                         ` Stephen J. Turnbull [this message]
2008-03-03 22:49         ` lexbind David De La Harpe Golden
2008-03-04 23:03       ` lexbind Richard Stallman
2008-03-04 23:18         ` lexbind Miles Bader
2008-03-05 21:33           ` lexbind Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17 22:10 lexbind Stefan Monnier
2011-02-18  3:54 ` lexbind Daniel Colascione
2011-02-18  3:57   ` lexbind Daniel Colascione
2011-02-18  4:48     ` lexbind Stefan Monnier
2011-02-20 18:39 ` lexbind Tom Tromey
2011-02-21 22:01   ` lexbind Stefan Monnier
2011-03-10  5:34 Emacs 23.3 released Chong Yidong
2011-03-10 16:07 ` Stefan Monnier
2011-03-10 19:21   ` Thierry Volpiatto
2011-03-11  4:20     ` Stefan Monnier
2011-03-11  7:14       ` Thierry Volpiatto
2011-03-12  3:35         ` Stefan Monnier
2011-03-12 12:23           ` Juanma Barranquero
2011-03-14 14:10             ` Stefan Monnier
2011-03-14 14:52               ` Juanma Barranquero
2011-03-14 15:51                 ` Lexbind (was: Emacs 23.3 released) Stefan Monnier
2011-03-17  1:59                   ` Juanma Barranquero
2011-03-17 20:01                     ` Lexbind Stefan Monnier
2011-03-17 22:07                       ` Lexbind Wojciech Meyer
2011-03-17 23:29                       ` Lexbind Juanma Barranquero
2011-03-18  7:39                         ` Lexbind joakim

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

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

  git send-email \
    --in-reply-to=87tzj9rm7y.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=paul.r.ml@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.