[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Imports / inclusion of s.el into Emacs
From: |
Adam Porter |
Subject: |
Re: Imports / inclusion of s.el into Emacs |
Date: |
Tue, 12 May 2020 14:14:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
João Távora <address@hidden> writes:
> However, if people are looking for other constructs to manage
> namespaces, it very much possible to develop shorthand.el so that you
> can have:
>
> (shorthand-in-namespace FOO :as "f")
>
> For more complicated cases where the library foo.el doesn't have a
> single prefix or renaming rule, we can use more sophisticated forms.
>
> I just provided the buffer-local-variable technique:
>
> ;; Local Variables:
> ;; shorthand-shorthands: (("^s-" . "magnar-string-"))
> ;; End:
>
> because it's practical, understood, and would be self-evident, i.e. work
> without much "magic".
I'm hopeful that this solution, or something like it, will make it into
Emacs! Thank you for working on this, João.
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-")
- RE: Imports / inclusion of s.el into Emacs, (continued)
- RE: Imports / inclusion of s.el into Emacs, Drew Adams, 2020/05/05
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/06
- Re: Imports / inclusion of s.el into Emacs, Stefan Monnier, 2020/05/06
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/06
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/06
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/07
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/07
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/09
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/11
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/12
- Re: Imports / inclusion of s.el into Emacs,
Adam Porter <=
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/12
- Re: Imports / inclusion of s.el into Emacs, Adam Porter, 2020/05/12
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/12
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/13
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/13
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/18
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/23
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/12
- Re: Imports / inclusion of s.el into Emacs, João Távora, 2020/05/13
- Re: Imports / inclusion of s.el into Emacs, Richard Stallman, 2020/05/12