emacs-devel
[Top][All Lists]
Advanced

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

Re: Proper namespaces in Elisp


From: Stefan Monnier
Subject: Re: Proper namespaces in Elisp
Date: Thu, 07 May 2020 16:28:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I don't like reader magic. It complicates code logic. I know we talked about
> symbol-macrolet and macrolet as possible options and know why neither is
> quite the right thing, but I still think that a macro of the same general
> kind would work fine. Macros don't need to recognize defining forms if they
> macroexpand their bodies before walking them.

You need not only discover the defining forms but also the "using"
forms.  So you need to know that the arguments to `make-local-variable`,
`add-hook`, `symbol-value`, `facep`, ... (and all function that pass
their arg to one of those) are not just random symbols (that you should
leave untouched) but symbols that obey the namespace rules.

In Common Lisp, the distinction is made by using keywords instead of
normal symbols when the namespace rules shouldn't apply, but Elisp
doesn't have such a tradition.


        Stefan




reply via email to

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