all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Recent attempts at standardizing major mode definitions.
Date: Tue, 3 Sep 2002 20:24:35 -0500 (CDT)	[thread overview]
Message-ID: <200209040124.UAA28338@eel.dms.auburn.edu> (raw)
In-Reply-To: <200209021651.g82Gpe007333@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

Stefan Monnier wrote:

   > define-derived-mode is currently used for two barely compatible, in
   > many respects diametrically opposite purposes:

   Could you expand a little ?  In what way are they diametrically opposed ?

As I already said, one use is to define a major mode starting from a
very closely related major mode.  This is a very specialized
situation.  In such a very specialized situation it is "easy" (or,
sometimes not so easy, as our discussion of inheritance versus using
of the parent abbrev table shows) to make standard decisions for the
author.  This provides convenience for the author and consistency for
the author.

Unless I misunderstood you, which is very well possible, you implied
in your previous message that you do not particularly care about this
particular use (again, I might have misunderstood), but it is the
original intended use and the code for a non-nil non-fundamental-mode
PARENT clearly reflects that, even the code for a nil PARENT still
does. 

The second use is as a standard way to define any major mode
whatsoever. There is a tremendous variety in major modes.  The level
of generality is "diametrically opposite" to the previous situation.
That is a very big difference.  In this situation, you have to make
only those decisions in advance, in the author's place, that you
definitely want all major modes to make.  The author can of course
override any decision the macro makes, as you showed with examples,
but the point is that (s)he should not have to worry about doing that.
Some modes, like dired and other related should not have an
abbrev-table for instance.  (I believe I would have to make some
change in my own proposed code to reflect that).  There is a
tremendous variety in major modes.

Sincerely,

Luc.

  parent reply	other threads:[~2002-09-04  1:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-02  2:40 Recent attempts at standardizing major mode definitions Luc Teirlinck
2002-09-02 16:51 ` Stefan Monnier
2002-09-02 17:49   ` Kai Großjohann
2002-09-02 20:39   ` Luc Teirlinck
2002-09-02 23:14     ` Stefan Monnier
2002-09-04  0:59       ` Luc Teirlinck
2002-09-04 15:27         ` Stefan Monnier
2002-09-04  1:24   ` Luc Teirlinck [this message]
2002-09-04 15:25     ` Stefan Monnier
2002-09-05  2:46     ` Richard Stallman
2002-09-04  1:35   ` Luc Teirlinck
2002-09-04 15:24     ` Stefan Monnier
2002-09-04 21:52       ` Luc Teirlinck
2002-09-05 15:54         ` Stefan Monnier
2002-09-05 16:52           ` Luc Teirlinck
2002-09-05 17:15             ` Luc Teirlinck
2002-09-04  2:06   ` Luc Teirlinck
2002-09-04 15:40     ` Stefan Monnier
2002-09-04 22:36       ` Luc Teirlinck
2002-09-06 18:03         ` Stefan Monnier
2002-09-06 18:48           ` David Masterson
2002-09-06 22:53           ` Luc Teirlinck
2002-09-07  0:05             ` Luc Teirlinck
2002-09-07  2:47             ` Luc Teirlinck
2002-09-07  3:06               ` Luc Teirlinck
2002-09-03 13:26 ` Richard Stallman
2002-09-03 13:56   ` Mario Lang
2002-09-05  2:45     ` Richard Stallman

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=200209040124.UAA28338@eel.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@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.