emacs-devel
[Top][All Lists]
Advanced

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

Re: Proper namespaces in Elisp


From: Tom Tromey
Subject: Re: Proper namespaces in Elisp
Date: Tue, 05 May 2020 09:10:38 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>>>> "João" == João Távora <address@hidden> writes:

João> An here's the idea: if the compiler uses the lexical-binding file-local 
var
João> when compiling specific files, or functions inside those files, why can't
João> it use a local-namespaces var when reading symbols?  I think this
João> very idea was floated at the time, but I can't find it.

I did something like this

https://github.com/tromey/emacs-module

It lets you write short names for things in your elisp; and lets you
import names with a shorter form.  However, the underlying symbols
actually use prefixes, in the traditional elisp way.

Unlike the "Names" package, it doesn't require wrapping your entire file
in a macro.  Instead it works using advice, in particular on
internal-macroexpand-for-load.

João> thing-at-point would also be taught about these local-namespaces
João> so xref and C-h f stuff would work  well.  Grep wouldn't know about it,
João> sure, that's true, but that's something that already afflicts other
João> languages with namespace qualifiers and isn't a terrible thing.
João> Any other great difficulties you can think ot?

These were the main problems I had when using it.

Tom



reply via email to

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