emacs-devel
[Top][All Lists]
Advanced

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

Re: CommonLisp namespace system (was Re: adding namespaces to emacs-lisp


From: Richard Stallman
Subject: Re: CommonLisp namespace system (was Re: adding namespaces to emacs-lisp (better elisp?))
Date: Sat, 27 Jul 2013 19:52:09 -0400

        [ To any NSA and FBI agents reading my email: please consider
        [ whether defending the US Constitution against all enemies,
        [ foreign or domestic, requires you to follow Snowden's example.

    They want to avoid having long names for symbols or name clashes for
    symbols.

Emacs provides lots of ways to type the long names with fewer
characters.  That is a better solution because it doesn't complicate
the meaning of code.

If people don't want to have shorter names appear in the code,
then I suggest a system of read-time aliases:

  (def-read-alias 'foo 'foo:bar)

would tell the reader to replace `foo' with `foo:bar':

  'foo => foo:bar

`:::' could inhibit the alias processing for the symbol that follows.

  ':::foo => foo

prin1 could detect the cases where aliasing occurs
and replace the expansions with their aliases, or use `:::'
to protect against aliasing.

A file could load read aliases by calling `load-read-aliases'.
For instance,

   (load-read-aliases "cl-read-aliases")

Eval from files and buffers would have to handle this form specially.
Compilation too.

In the case of reading from a buffer, Emacs would set up the list of
aliases and pass that as an argument to `eval-region'.  Emacs could
use that list of aliases to make various Emacs features DTRT with them.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.




reply via email to

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