unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Defvar not called at top level
@ 2021-11-23 13:28 Arthur Miller
  2021-11-23 13:58 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Arthur Miller @ 2021-11-23 13:28 UTC (permalink / raw)
  To: emacs-devel


Just a question: why is it important to call defvar from top level?

I would like to have some code that generates some other code, amongs that to
declare few global symbols with auto generated docs as well.

If I call those from a defun/macro normally I get that warning that defvar is
not called at top level; so I guess it is for some reason a bad practice? So if
I generate some code that will be called at some later time that uses defvar I
guess it would be equally bad practice.

I just wonder, why is it demanded to call defvar as top level form?



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

end of thread, other threads:[~2021-11-25  3:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 13:28 Defvar not called at top level Arthur Miller
2021-11-23 13:58 ` Stefan Monnier
2021-11-24 10:47   ` Arthur Miller
2021-11-24 13:38     ` Stefan Monnier
2021-11-25  3:04       ` Arthur Miller

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