[comp.emacs] Elisp libraries

gudeman@cs.arizona.edu (David Gudeman) (11/25/90)

I thought this "shadowing" idea was very interesting, and something
that deserves a lot of consideration.  The GNU Emacs library system is
hopelessly baroque, and was not well designed from the beginning for
the sort of use it gets.  It is inherently different from other
systems because of the large number of libraries that come from large
numbers of different places.  The shadowing idea would help
customization, and it would also be nice to have some other things.

(1) there should be some standard way of finding out _which_ function
is currently defined, and which function will be loaded by default.  I
have in mind something like 

  (where-defined symbol &optional var-def)
  -- returns the file-and-position or the buffer where the current
  -- function definition of SYMBOL was read from.  There is no
  -- guarantee that the function text is still there.  If optional
  -- second arg VAR-DEF is non-nil, return the place where the
  -- _variable_ definition was read instead.

for the first, but it isn't clear how to do the second.

(2) elisp _really_ REALLY neads some sort of name-space control.  The
most reasonable would probably be Common Lisp packages, but I'm not
picky.  I just don't want to name all my functions

  <library-name>-<function-name>

any more (e.g.: dired-do-deletions, rnews-delete-article, etc.)

(3) If function names had dynamic scope like variables, there are a
lot of things that would be easier.  The current system of redefining
keymaps doesn't work unless the user is using default keybindings to
begin with (this is one of the major reasons the shadow mechanism is
needed, but it creates more work than necessary).  If there were
buffer-local functions you could do stuff like

  (make-local-function 'next-line)
  (fset 'next-line 'dired-next-line)

and then it would work no matter how the user had his keys set up.
-- 
					David Gudeman
Department of Computer Science
The University of Arizona        gudeman@cs.arizona.edu
Tucson, AZ 85721                 noao!arizona!gudeman