[climacs-devel] suggested gardener project

Robert Strandh strandh at labri.fr
Tue Dec 20 17:49:33 UTC 2005


As a gardener project, I suggest "syntax-specific abbrevs".  Something
like this:

    The abbrev module of Climacs expands abbrevs by calling a generic
    function that typically has methods that specialize on the
    `abbrev-expander' argument.  This abstraction seem to be
    reasonable.  However, client code does not take full advantage of
    this capability.  It would be nice to have client code
    (essentially the `possibly-expand-abbrev' function) check a series
    of (at least two) abbrev expanders, say the buffer-specific one
    and a new one defined for the syntax of the buffer. 

    This would allow a user to define abbreviations specific to a
    particular natural language (by defining an
    `english-abbrev-expander') or to a particular programming
    language. 

    To demonstrate the possibilities of the abbrev abstraction, it
    would also be nice to define some more sophisticated abbrev
    expanders.  Right now, the only one used is the
    `dictionary-abbrev-expander' which maintains an alist of
    abbrev/expansion pairs.  It would be interesting to define one
    for Lisp that uses the SLIME algorithm for expanding things like
    m-v-b to multiple-value-bind.  

    The current dictionary-abbrev-expander is not terribly efficient
    due to the use of a simple alist.  Using a hash table instead
    would be an improvement. 

    As a minor point, the `possibly-expand-abbrev' function should be
    moved out of the abbrev module, so that the abbrev module becomes
    independent of Climacs. 

What do you think?
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------



More information about the climacs-devel mailing list