[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Abbrev tables in elisp with some extra stuff
From: |
Richard Stallman |
Subject: |
Re: Abbrev tables in elisp with some extra stuff |
Date: |
Sat, 13 Oct 2007 02:41:08 -0400 |
In my experience, this exception usually holds for groups of abbreviations
or even for all abbrevs defined in a mode (typically for skeleton-abbrevs),
so it seems convenient to set it once and for all for the whole group.
The simple, natural, and general interface is to specify this per
abbrev. Please provide and document that method.
Likewise for :enable-function.
> 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.
Why not?
Because you should not have to know that a certain mode uses two
abbrev tables and choose the right one.
> The right way to do this is to have minor-mode-abbrev-table-alist
> which would work like minor-mode-map-alist.
We could do that as well, but it didn't seem to be much better and makes for
more complex processing in expand-abbrev which is likely to be more often
executed than enabling/disabling minor modes. As long as the minor mode is
enabled/disabled via the function, we can provide the same behavior in
either case.
That is precisely what I want to avoid. It is unclean that minor
modes have to be turned on or off by a function.
Would you please implement minor-mode-abbrev-table-alist?
> Using `labels' in this way also requires an explanation
> of why it is written this way.
It's just so as to use lexical scoping, which is much cleaner than going
through the gensym rigmarole.
> Did you try to write it in a more straightforward way, without
> `labels'? If so, what was the problem with that approach?
lexical scoping *is* the straightforward way.
I had to struggle to understand it. Please see if this can
be implemented straightforwardly in another way, without `labels'.
> +(defun write--abbrev (sym)
> This name should start with `internal-'.
> +(defun describe--abbrev (sym)
> Likewise.
I like the "--" convention used in a few other packages, mostly because it
still sticks to the normal prefix.
Which packages do you have in mind?
- Abbrev tables in elisp with some extra stuff (was: Abbrev should preserve case), Stefan Monnier, 2007/10/10
- Re: Abbrev tables in elisp with some extra stuff, Stefan Monnier, 2007/10/16
- Re: Abbrev tables in elisp with some extra stuff, Richard Stallman, 2007/10/17
- Re: Abbrev tables in elisp with some extra stuff, Richard Stallman, 2007/10/17
- Re: Abbrev tables in elisp with some extra stuff, Richard Stallman, 2007/10/17
- Re: Abbrev tables in elisp with some extra stuff, Stefan Monnier, 2007/10/23
- Re: Abbrev tables in elisp with some extra stuff, Richard Stallman, 2007/10/24