all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Macro Expansion Inconsistency
@ 2014-12-16 20:57 Alexander Shukaev
  0 siblings, 0 replies; 23+ messages in thread
From: Alexander Shukaev @ 2014-12-16 20:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hello everyone,

Just wasted a couple of hours with the following macro:

(defmacro test
    (name)
  `(let* ((name             ',name)
          (symbol           (intern (concat "some" "-" (symbol-name
name)))))
     ,symbol))

Running

(test xxx)

reports error: (void-variable symbol).

What?

Refactoring to

(defmacro test
    (name)
  `(let* ((name             ',name))
     ,(intern (concat "some" "-" (symbol-name name)))))

and running

(test xxx)

works as expected.

Could anybody clarify what's going on? Thanks.

Regards,
Alexander


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

end of thread, other threads:[~2014-12-17 16:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.16228.1418763453.1147.help-gnu-emacs@gnu.org>
2014-12-16 21:10 ` Macro Expansion Inconsistency Joost Kremers
2014-12-16 21:25   ` Alexander Shukaev
2014-12-16 21:46     ` John Mastro
2014-12-16 22:58       ` Alexander Shukaev
2014-12-16 23:14         ` Alexander Shukaev
2014-12-17  2:19           ` Alexander Shukaev
2014-12-17 10:04             ` Nicolas Richard
2014-12-17 14:03               ` Alexander Shukaev
2014-12-17 14:20                 ` Stefan Monnier
2014-12-17 14:34                   ` Alexander Shukaev
2014-12-17 14:21                 ` Nicolas Richard
2014-12-17 14:52                   ` Alexander Shukaev
2014-12-17 14:58                     ` Nicolas Richard
2014-12-17 15:14                       ` Alexander Shukaev
     [not found]               ` <mailman.16290.1418825041.1147.help-gnu-emacs@gnu.org>
2014-12-17 15:53                 ` Barry Margolin
2014-12-17 16:01                   ` Alexander Shukaev
     [not found]           ` <mailman.16262.1418782759.1147.help-gnu-emacs@gnu.org>
2014-12-17  3:03             ` Rusi
2014-12-17  9:21               ` Nicolas Richard
2014-12-16 23:20         ` John Mastro
     [not found]           ` <CAKu-7WzgoHH=zM_jxeVGMwzAne88nAoCUsLKQv9zUYo_amsjNg@mail.gmail.com>
2014-12-17  3:34             ` John Mastro
2014-12-17  3:41               ` John Mastro
2014-12-16 23:30   ` Stefan Monnier
2014-12-16 20:57 Alexander Shukaev

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.