unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Conditional evaluation?
@ 2009-07-27  8:09 Elena
  2009-07-27  8:33 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 2+ messages in thread
From: Elena @ 2009-07-27  8:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

whenever I'm testing a new chunk of Emacs Lisp, I'd like to
conditionally include/exclude it without resorting to "comment-
region". Is using "when" correct?

    (when nil ;; use t to enable evaluation
        (require 'some-package)
        ;; etc.
    )

Or do I need an alternative form to make code evaluate at top level?

Thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Conditional evaluation?
  2009-07-27  8:09 Conditional evaluation? Elena
@ 2009-07-27  8:33 ` Pascal J. Bourguignon
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal J. Bourguignon @ 2009-07-27  8:33 UTC (permalink / raw)
  To: help-gnu-emacs

Elena <egarrulo@gmail.com> writes:
> whenever I'm testing a new chunk of Emacs Lisp, I'd like to
> conditionally include/exclude it without resorting to "comment-
> region". Is using "when" correct?
>
>     (when nil ;; use t to enable evaluation
>         (require 'some-package)
>         ;; etc.
>     )

Yes, it works well.


> Or do I need an alternative form to make code evaluate at top level?

There's no #+,  #-, #| reader syntax in emacs lisp, and no way to add
one (easily).


-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-27  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27  8:09 Conditional evaluation? Elena
2009-07-27  8:33 ` Pascal J. Bourguignon

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