all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "João Távora" <joaotavora@gmail.com>
Cc: Thierry Volpiatto <thierry.volpiatto@gmail.com>,
	Ivan Kanis <ivan.kanis@googlemail.com>,
	emacs-devel@gnu.org
Subject: Re: problems with flet on last emacs
Date: Fri, 09 Nov 2012 14:23:12 -0500	[thread overview]
Message-ID: <jwv1ug24mvq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CALDnm52KzwPDL+kVa5+JQVqi7mRQWJkBK_R+4biX-v0_XoR53g@mail.gmail.com> ("João Távora"'s message of "Fri, 9 Nov 2012 17:41:07 +0000")

> Is `flet` (not cl-flet) going to be available in future emacsen?

Depends how "future" those emacsen are.  And also depends on how the
future turns out to be.  In my ideal future, those CL thingies not
prefixed by "cl-" will indeed disappear.  But given the enormous amount
of packages out there that use (require 'cl), this future is still
many years away.

And when cl.el gets dropped from Emacs, it'll probably be moved to GNU
ELPA.  Similarly, a forward-compatiblity cl-lib.el may appear on ELPA
(hopefully earlier) for Emacs<24.3, so that packages can move to cl-lib
without restricting themselves to Emacs-24.3 and up.

> Or should I start future-proofing my code with compatibility macros?

You could help write the cl-lib.el forward-compatibility package.

> What about `labels` and other common-lisp macros and defuns?

`flet' is special in that it was a weird beast using an ugly
implementation.  So while all of cl.el will be marked obsolete (i.e. not
yet removed) at some point (maybe for Emacs-25?), `flet' (along with
a couple others) is already marked obsolete.

Of course, I recommend you use cl-flet, cl-flet*, or cl-labels, but if
you don't want to limit yourself to emacs>24.2 you can use
`labels' instead.

These have the advantage that the function definitions are lexically
scoped, contrary to `flet' which ends up having the same kind of
problems as `defadvice' but without saying so.


        Stefan



  reply	other threads:[~2012-11-09 19:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 12:36 problems with flet on last emacs Thierry Volpiatto
2012-06-27 12:49 ` Pascal J. Bourguignon
2012-06-27 15:29   ` Stefan Monnier
2012-06-27 16:38     ` Thierry Volpiatto
2012-06-28  6:53     ` Ivan Kanis
2012-06-28  7:31       ` Thierry Volpiatto
2012-06-29  5:42         ` Ivan Kanis
2012-06-29  6:17           ` Thierry Volpiatto
2012-07-12  8:22             ` Ivan Kanis
2012-07-12 14:40               ` Stefan Monnier
2012-07-12 16:44                 ` Ivan Kanis
2012-11-09 17:41                   ` João Távora
2012-11-09 19:23                     ` Stefan Monnier [this message]
2012-11-10 14:12                       ` João Távora
2012-11-10 22:46                         ` Stefan Monnier
2012-11-10 23:07                           ` João Távora
2012-11-10 23:38                             ` Stefan Monnier
2012-11-12  8:02                               ` Andreas Röhler
2012-06-27 13:24 ` Tassilo Horn
2012-06-27 13:43   ` Thierry Volpiatto
2012-06-27 14:27   ` Thierry Volpiatto
2012-06-27 14:42   ` Pascal J. Bourguignon
2012-06-27 15:55     ` Tassilo Horn
2012-06-27 16:29       ` Pascal J. Bourguignon
2012-06-27 19:42         ` Tassilo Horn
2012-06-27 19:46           ` Pascal J. Bourguignon
2012-06-27 15:01   ` Andreas Schwab
2012-06-27 16:03     ` Tassilo Horn
2012-06-27 16:22 ` Glenn Morris

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=jwv1ug24mvq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=ivan.kanis@googlemail.com \
    --cc=joaotavora@gmail.com \
    --cc=thierry.volpiatto@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.