emacs-devel
[Top][All Lists]
Advanced

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

Re: Bugs caused by recent use of define-derived-mode


From: Stefan Monnier
Subject: Re: Bugs caused by recent use of define-derived-mode
Date: Mon, 02 Sep 2002 19:20:35 -0400

> Is inheritance of abbrev tables desirable or needed?  Inheritance of
> abbrev tables would essentially be equivalent to the introduction of
> "recursively super-local abbrevs".  I doubt I would use such a feature
> myself.  Of course everybody may have his or her own ways to use
> local abbrevs and maybe other people could find it useful.

Either people are annoyed "why does this mode use another abbrev-table
than that mode" or they're complaining that "I can't define an abbrev
in this mode without it being also defined in that mode".

Inheritance is the way to reconcile the two.

> The fact is though that currently we do not have inheritance of
> abbrevs.  I believe that the current "poor man's inheritance" is an
> unacceptable alternative.  It makes a lottery out of abbrev expansion.

Again, please show us examples.

> modes should use the same abbrev-table.  As long as there is no true
> inheritance I consider the existence of a
> paragraph-indent-text-mode-abbrev-table an "annoying feature" (to
> avoid the b-word).

I'd call it a misfeature even with true inheritance, actually.

> bug.)  There actually was a related "nuisance feature" for
> syntax-tables, but since Stefan's patch can be used for that one too,
> I do not see any reason to expand on this.

I'd love for you to expand on it.  So you're saying that the default
behavior of `define-derived-mode' w.r.t syntax-tables introduces problem
but that using

        (defvar foo-mode-syntax-table bar-mode-syntax-table)
        (define-derived-mode foo-mode bar-mode "foo" "doc")

works around the problem ?  Could you describe the problem ?

> Stefan Monnier wrote:
> 
>    I'm not sure it's correct.  There has already been people on
>    gnu.emacs.help asking why they can't define abbrevs that are
>    specific to their mail buffers.
> 
> Are you sure they were asking that because they really wanted that
> feature or because they were confused by the fact that mailabbrev.el
> mistakenly claimed that there was a mail-mode-abbrev-table?

There was no mail-mode-abbrev-table at all at that point.


        Stefan





reply via email to

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