* macro defining function and byte compiler
@ 2019-05-04 21:22 akrl
2019-05-05 2:03 ` Noam Postavsky
0 siblings, 1 reply; 2+ messages in thread
From: akrl @ 2019-05-04 21:22 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I'm trying to byte-compile a file with the following content:
(defmacro xxx ()
`(progn
(defun ,(make-symbol "yyy") ())
(defun zzz ())))
(xxx)
(defun test1 ()
(yyy))
(defun test2 ()
(zzz))
From the *Compile-Log* I see:
Warning: the function ‘yyy’ is not known to be defined.
I'm then wondering why the byte compiler is happy with zzz but not yyy.
I'm certanly missing something here.
Thanks and bests
Andrea
--
akrl@sdf.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: macro defining function and byte compiler
2019-05-04 21:22 macro defining function and byte compiler akrl
@ 2019-05-05 2:03 ` Noam Postavsky
0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2019-05-05 2:03 UTC (permalink / raw)
To: akrl; +Cc: Help Gnu Emacs mailing list
On Sat, 4 May 2019 at 21:12, akrl <akrl@sdf.org> wrote:
> (defmacro xxx ()
> `(progn
> (defun ,(make-symbol "yyy") ())
You probably want intern instead of make-symbol: make-symbol creates a
new symbol which is distinct from other symbols named "yyy".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-05 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-04 21:22 macro defining function and byte compiler akrl
2019-05-05 2:03 ` Noam Postavsky
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).