all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.