emacs-devel
[Top][All Lists]
Advanced

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

Re: Imports / inclusion of s.el into Emacs


From: João Távora
Subject: Re: Imports / inclusion of s.el into Emacs
Date: Tue, 12 May 2020 20:39:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

Adam Porter <address@hidden> writes:

> João Távora <address@hidden> writes:
>
> I'm hopeful that this solution, or something like it, will make it into
> Emacs!  Thank you for working on this, João.

You're welcome.  Let's hope we find a practical solution this time
around!

> One minor drawback I see is that the symbol renaming is placed at the
> bottom of an Elisp file, while the loading of the library whose symbols
> are renamed is (usually) at the top of the file.
>
> Would a macro something like this be feasible, to (require ...) the
> library and specify the renamings together?
>
>   (shorthand-require 'magnar-string :with "^s-" :as "magnar-string-")

Yes, something like that is reasoanble.  Or we can just have a table of
"notable renamings", and then the bare (require 'magnar-string) would
come with that.  Or as Richard, suggested, the default renamings could
be given in the magnar-string.el file itself.  They could be collected
within each byte-compile-file or load-file, then restored.  

One thing that I'd like to discuss is whether it's a good idea or not to
rename s.el to magnar-string.el.  Maybe there's a way to keep calling it
s.el and let every client keep using (require 's).

Another thing that has to implemented is a special syntax to escape the
renamings (imagine that you want to use some legitimate "s-foo" function
that your renaming has shadowed)

João







reply via email to

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