[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Defvar not called at top level

From: Arthur Miller
Subject: Defvar not called at top level
Date: Tue, 23 Nov 2021 14:28:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]