emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: functions from cl package called at runtime
Date: Thu, 19 Jan 2012 20:22:37 +0100	[thread overview]
Message-ID: <87r4yvcxaa.fsf@Rainer.invalid> (raw)
In-Reply-To: 87k44n4la9.fsf@gmx.com

Eric Schulte <eric.schulte@gmx.com> writes:
> Is there a convention for which macros from cl-macs are allowable and
> which are forbidden?

You might want to ask on the Emacs list, but my understanding is that no
Emacs core packages should depend on cl _at runtime_, but it is OK to
use the cl package during byte-compilation.

>  For example `flet' is used extensively throughout
> the Org-mode code base.  Is the convention that macros are allowable
> while functions are not?

A macro would typically be expanded at compile time, so that would be
OK.  AFAIK gensym is a function, not a macro.  The calls to gensym that
the byte-compiler complains about are expanded at runtime because they
are themselves inside a macro definition.

> Also, while intersection below is a function defined in cl-seq, the use
> of `intersection' in ob.el refers to a local function and not the cl-seq
> function, so it should be fine.

The byte-compiler thinks otherwise, so I'd check that assumption
again... but it might be a good idea to disambiguate the name with a
prefix anyway.  I've just tested the latter approach (renaming
intersection to ob-intersection) and it does work, so somehow the
byte-compiler doesn't quite get what is going on in the flet expansion
when the symbol is already present via the cl package.

I've just looked at the comments in cl-macs.el and it seems that flet
should be used with care anyway, since it is not quite doing what it is
supposed to do...


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 19:05 functions from cl package called at runtime Achim Gratz
2012-01-19 18:08 ` Eric Schulte
2012-01-19 19:22   ` Achim Gratz [this message]
2012-01-19 22:04     ` Eric Schulte

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87r4yvcxaa.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@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.
Code repositories for project(s) associated with this public inbox

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

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).