unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Strange behavior of macro
@ 2006-05-30  8:56 Herbert Euler
  2006-05-30  9:34 ` David Kastrup
  2006-05-30 10:23 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Herbert Euler @ 2006-05-30  8:56 UTC (permalink / raw)


Hello,

Is the following in Emacs a expected behavior of macro?

    (defmacro m1 (v)
      (let ((len (length (eval v))))
        `(quote ,len)))
         => m1

    (m1 '(1 2 3))
         => 3

    (setq v1 '(1 2 3))
         => (1 2 3)

    (m1 v1)
         => 3

    (setq v v1)
         => (1 2 3)

    (m1 v)
         => error: (wrong-type-argument sequencep v)

Thanks.

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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

end of thread, other threads:[~2006-05-30 10:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30  8:56 Strange behavior of macro Herbert Euler
2006-05-30  9:34 ` David Kastrup
2006-05-30 10:23 ` Andreas Schwab
2006-05-30 10:31   ` Herbert Euler
2006-05-30 10:35     ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).