emacs-devel
[Top][All Lists]
Advanced

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

Re: Abbrev tables in elisp with some extra stuff (was: Abbrev should pre


From: Richard Stallman
Subject: Re: Abbrev tables in elisp with some extra stuff (was: Abbrev should preserve case)
Date: Fri, 12 Oct 2007 11:59:09 -0400

      - :case-preserve non-nil means that abbreviations are lookedup without
        case-folding, and the expansion is not capitalized/upcased.

It seems like a mistake to make this a per-table decision.
In every abbrev table, abbrevs should preserve case by default.
To define an abbrev that is only detected in a particular case
is an exception, so each abbrev needs to be marked if it is
to work that way.

      - :syntax-table holds the syntax table to use to find the relevant word.

Why do we want this?

      - :abbrev-before-point-function holds a function to use to find the
        abbrev at point.

Why do we want this?

      - :enable-function can be set to a function of no argument which returns
        non-nil iff the abbrevs in this table should be used for this instance
        of `expand-abbrev'.  Useful to disable skeleton-abbrevs in strings and
        comments.

That feature is useful, but shouldn't it be per-abbrev, not per-table?
If we have some abbrevs that are from skeletons, and some abbrevs that
are not, we don't want to have to put them in different abbrev tables.

    - allow local-abbrev-table to hold a list of abbrev tables so minor
      modes can add their own abbrev tables as well (useful for mailabbrev.el).

The right way to do this is to have minor-mode-abbrev-table-alist
which would work like minor-mode-map-alist.

    +(defvar abbrev-auto-activated-tables t
    +  ;; Could be expanded to be a predicate.
    +  "List of abbrev tables that can be used when `expand-abbrev' is called 
implicitly.
    +If t, use all installed tables.")

Is this the best way to design the feature so that `mail-abbrevs-only'
can use it?  Ideally we want some hook function to test
`mail-abbrevs-only' and DTRT, so that setting or binding
`mail-abbrevs-only' in any fashion has the right effect.  That is the
case with the current code in mailabbrev.el.  I don't want to take
a step backwards.





reply via email to

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