unofficial mirror of emacs-devel@gnu.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 21:06:03 -0500 (CDT)	[thread overview]
Message-ID: <200209040206.VAA28356@eel.dms.auburn.edu> (raw)
In-Reply-To: <200209021651.g82Gpe007333@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

Stefan Monnier wrote:

   > I believe the current value of "nil" for PARENT should be
   > eliminated and replaced by a separate macro `define-major-mode', which
   > would be a true analogue of `define-minor-mode'.  This would then
   > take over as the "standard" way to define a major mode.

   And what would be the benefit ?
   I know Richard hates `define-derived-mode' and wants a `define-major-mode'
   instead.  My point is just that the two can be merged and that we can
   define `define-major-mode as an alias for `define-derived-mode'
   or if you really dislike the "nil" argument, you can just do

     (defmacro define-major-mode (mode name &optional docstring &rest body)
       `(define-derived-mode ,mode nil ,name ,docstring ,@body)

   > I propose to define a macro that would be called like this:
   > 
   > (define-major-mode mymode name syntax-table abbrev-table mode-class
   > docstring body)

What is the benefit of the current situation?  It uses a macro for a
purpose that is way more general than its original intended purpose
and artificially forces two functionalities into one.  It all seems
very unnatural to me.

Defining a separate define-major-mode in the way you suggest would be
an improvement over the current situation.  However, it still seems
unnatural to define a very general function essentially as a special
case of an extremely specialized function.  It would be far more
logical to do the opposite.

I do not understand why you feel so strongly about this.  Richard
actually seems to agree with you in as far as the desirability of a
standard function is concerned.  So do I.  This seems to be the really
fundamental question.  The rest are technical details.  You extremely
strongly seem to insist that this standard function should be a
special case of define-derived-mode, which seems completely illogical.
Why?  What is the benefit of that?

Sincerely,

Luc.

  parent reply	other threads:[~2002-09-04  2:06 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=200209040206.VAA28356@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).