all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "rgb" <rbielaws@i1.net>
Subject: Re: Keeping run-time code from running at compile-time
Date: 7 Oct 2005 09:45:58 -0700	[thread overview]
Message-ID: <1128703558.726448.12400@z14g2000cwz.googlegroups.com> (raw)
In-Reply-To: <mailman.10195.1128661802.20277.help-gnu-emacs@gnu.org>

> (defun foo ()
>   (error "Shouldn't hit this when compiling"))
> (foo)

You are explicitly invoking foo here.
The only difference between (defun ...) and (foo ...) in
any file that you require or load is in your mind.
They are just functions to be executed.  Lisp doesn't
care if they are named def<something> or not.

> (provide 'a)
>
> (require 'a)
> (defun doit ()
>   (message "%s" "Hello, world!"))
>

To achieve what you seem to want you need:

---x---
(defun foo ()
  (error "Shouldn't hit this when compiling"))
(provide 'x)
---a---
(require 'x)
(foo)
(provide 'a)
---b---
> (require 'x)
> (defun doit ()
>   (message "%s" "Hello, world!"))

  parent reply	other threads:[~2005-10-07 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4951.1128644991@olgas.newt.com>
2005-10-07  5:06 ` Keeping run-time code from running at compile-time Bill Wohler
2005-10-07  5:09   ` Bill Wohler
2005-10-07  5:09 ` Bill Wohler
     [not found] ` <mailman.10195.1128661802.20277.help-gnu-emacs@gnu.org>
2005-10-07 16:45   ` rgb [this message]
2005-10-11  3:48   ` Stefan Monnier

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=1128703558.726448.12400@z14g2000cwz.googlegroups.com \
    --to=rbielaws@i1.net \
    /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.