all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: rms@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu,
	Kai.Grossjohann@CS.Uni-Dortmund.DE, emacs-devel@gnu.org
Subject: Re: Bugs caused by recent use of define-derived-mode
Date: Mon, 9 Sep 2002 13:42:24 -0500 (CDT)	[thread overview]
Message-ID: <200209091842.NAA09278@eel.dms.auburn.edu> (raw)
In-Reply-To: <20020909134905.GB18843@gnu.org> (message from Miles Bader on Mon, 9 Sep 2002 09:49:05 -0400)

Miles Bader wrote:

   However, is all the mechanism you suggested necessary?
   Can't users just create their own local abbrev table in the mode hook (which
   define-derived-mode will make sure the command supports!)?

   If it's simple to do that, then we really needn't do anything at all...

If the only problem is that a user wants a mail-mode-abbrev-table that
is completely separate from the text-mode-abbrev-table, then that can
be customized very easily in .emacs right now.  If that is the only
problem then no changes whatsoever are required.

The problem occurs when a user wants to have both mail-mode abbrevs
and text-mode abbrevs expand in mail-mode.

I believe you have not been closely following the entire thread.  To
give a quick summary of the issues involved:

As it stands right now, define-derived-mode makes a new abbrev-table
and then tries to make that new abbrev table "inherit" from the parent
abbrev-table using a copying mechanism.  This mechanism has various
flaws, including outright bugs, that are difficult to fix.

My first proposal was to quite simply fix these problems by making the
derived mode use the parent abbrev table and get rid of copying
altogether.  This can be done using very minor changes (actually
simplifications) in define-derived-mode.  No further work needed.  End
of problem.

However, Stefan argued that the copying system addressed a real need
of people who were dissatisfied with text-mode-abbrev-table as
mail-mode's abbrev-table.  I have not seen the postings, so I do not
know what the people in question wanted, that is, if they would have
been satisfied with a completely separate mail-mode abbrev table.

Anyway, Stefan and Kai argued that "inheritance" for abbrev tables was
a useful feature.  I personally had several objections against it.
Richard voiced some additional objections.  Working with multiple
local abbrev tables is in my opinion the only "solid" way to implement
something with a functionality similar to "inheritance".  The system I
proposed gets rid of my own objections.  I believe it also addresses
the objections Richard raised.

There is one problem left.  Whichever solution we pick, somebody will
have to implement it.  That person will have to be careful not to
introduce bugs.  If bugs are introduced, somebody will need to fix
them.  The person or persons doing all that work could be doing other
things instead.

So, indeed the very first question is: 

Is there a real need to implement some form of "inheritance" for
abbrevs.

If there is a real need to keep the current abbrev behavior of
define-derived-mode, in any form, then the answer to the above
question would be yes.  If sufficiently many users felt a need for it,
the answer would be yes too.

The feature I propose is actually more general and flexible than
inheritance, but I believe it is also more easy to implement in a way
that is bug-free and does not introduce a variety of unintended and
very much user visible negative side effects.

Sincerely,

Luc.

  parent reply	other threads:[~2002-09-09 18:42 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-02  2:37 Bugs caused by recent use of define-derived-mode Luc Teirlinck
2002-09-02 16:29 ` Stefan Monnier
2002-09-02 23:02   ` Luc Teirlinck
2002-09-02 23:20     ` Stefan Monnier
2002-09-02 23:25       ` Luc Teirlinck
2002-09-02 23:29         ` Stefan Monnier
2002-09-02 23:46           ` Luc Teirlinck
2002-09-03  0:26             ` Stefan Monnier
2002-09-03  1:21       ` Luc Teirlinck
2002-09-03  2:08         ` Stefan Monnier
2002-09-03  2:04       ` Luc Teirlinck
2002-09-03  2:07         ` Stefan Monnier
2002-09-03 14:05     ` Kai Großjohann
2002-09-03 15:06       ` Stefan Monnier
2002-09-03 15:36         ` Luc Teirlinck
2002-09-03 21:23           ` Luc Teirlinck
2002-09-04  0:01             ` Luc Teirlinck
2002-09-04  3:28               ` Luc Teirlinck
2002-09-04  3:49                 ` Miles Bader
2002-09-04 12:31                   ` Luc Teirlinck
2002-09-05  2:46               ` Richard Stallman
2002-09-05  4:37                 ` Luc Teirlinck
2002-09-08 12:54                   ` Richard Stallman
2002-09-09  0:14                     ` Luc Teirlinck
2002-09-09  1:36                       ` Luc Teirlinck
2002-09-09 23:33                         ` Richard Stallman
2002-09-10  0:12                           ` Luc Teirlinck
2002-09-09  2:35                       ` Luc Teirlinck
2002-09-09 13:49                       ` Miles Bader
2002-09-09 15:25                         ` Kim F. Storm
2002-09-09 18:42                         ` Luc Teirlinck [this message]
2002-09-10 16:36                           ` Richard Stallman
2002-09-11  4:30                             ` Luc Teirlinck
2002-09-11 20:03                               ` Richard Stallman
2002-09-09 19:15                       ` Richard Stallman
2002-09-05 11:07                 ` Kai Großjohann
2002-09-06  1:26                   ` Miles Bader
2002-09-06  2:11                     ` Luc Teirlinck
2002-09-06  2:26                       ` Miles Bader
2002-09-06  2:31                         ` Luc Teirlinck
2002-09-06  2:31                       ` Miles Bader
2002-09-06 10:52                       ` Kai Großjohann
2002-09-07  3:16                         ` Richard Stallman
2002-09-06 20:03                     ` Richard Stallman
2002-09-06 15:11                   ` Richard Stallman
2002-09-04 14:13   ` Richard Stallman
2002-09-04 16:01     ` Stefan Monnier
2002-09-03 13:26 ` Richard Stallman
2002-09-03 14:57   ` Stefan Monnier
2002-09-05  2:46     ` Richard Stallman
2002-09-06 16:07       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200209091842.NAA09278@eel.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=Kai.Grossjohann@CS.Uni-Dortmund.DE \
    --cc=emacs-devel@gnu.org \
    --cc=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.