unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
@ 2021-06-29 18:06 João Távora
  2021-06-29 18:16 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 52+ messages in thread
From: João Távora @ 2021-06-29 18:06 UTC (permalink / raw)
  To: 49278; +Cc: monnier

Hi,

It's been the status quo for a long time now that Lisp Mode is the Emacs
major mode for editing Common Lisp programs.  The SLIME and SLY packages
are popular amongst CL programmers and have relied on this fact for many
years (SLIME in I think has been the tool of choice for Emacs+CL for
more than 15 years).

In addition, there are many references to "Common Lisp" in lisp-mode.el.

In addition, non-CL-lisps have also historically used their own major
modes derived from prog-mode.  Examples are Emacs lisp mode, Scheme mode
and Clojure mode.

In addition, there is in Emacs 27.1 a new lisp-data-mode.  That is
useful for defining using define-derived-mode to make Lisp-like major
modes derived from commonly found Lisp-style functionality such as
parenthesis-matching syntax tables and such.

However, the docstring of lisp-mode, the function, still states that it
is used for "Lisps other than GNU Emacs Lisp".  Likely this docstring
was written when Common Lisp was still young and intended to group its
closely-related Lisp brethren (MacLisp, Franz Lisp, etc) in mind.

Those variants are now gone, we should update lisp-mode.el's docstring
to reflect the state of things, since a fraction of people seem to be
misusing lisp-mode to derive new major modes for new niche Lisps, where
they should be using lisp-data-mode (perhaps they are not aware of it).

See also:

  https://gitlab.com/technomancy/fennel-mode/-/issues/11
  https://github.com/joaotavora/sly/issues/339
  https://emacs.stackexchange.com/questions/18646/why-isnt-emacs-lisp-mode-derived-from-lisp-mode/18652#18652

João


To fix this, I suggest this documentation patch.


diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 8de93867ba..7d655449c5 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1764,10 +1764,10 @@ External Lisp
 @cindex mode, Lisp
 @cindex Common Lisp
 
-  Lisp mode is the major mode for editing programs written in
-general-purpose Lisp dialects, such as Common Lisp.  Its mode command
-is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
-whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
+  Lisp mode is the major mode for editing programs written in Common
+Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
+lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
+end in @file{.l}, @file{.lsp}, or @file{.lisp}.
 
 @findex run-lisp
 @vindex inferior-lisp-program
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 59325d647d..99bf1a98c2 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -765,7 +765,7 @@ lisp-mode-menu
      :help "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'"]))
 
 (define-derived-mode lisp-mode lisp-data-mode "Lisp"
-  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
+  "Major mode for editing Common Lisp code.
 Commands:
 Delete converts tabs to spaces as it moves back.
 Blank lines separate paragraphs.  Semicolons start comments.






^ permalink raw reply related	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:06 bug#49278: 28.0.50; Lisp Mode is for Common Lisp João Távora
@ 2021-06-29 18:16 ` Eli Zaretskii
  2021-06-29 18:25   ` João Távora
  2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30  3:50 ` Phil Hagelberg
  2021-09-24 23:01 ` Stefan Kangas
  2 siblings, 2 replies; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-29 18:16 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Tue, 29 Jun 2021 19:06:19 +0100
> Cc: monnier@iro.umontreal.ca
> 
> -  Lisp mode is the major mode for editing programs written in
> -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
> -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
> -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> +  Lisp mode is the major mode for editing programs written in Common
> +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
> +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
> +end in @file{.l}, @file{.lsp}, or @file{.lisp}.

This basically doesn't change anything, and the original text does
mention CL.  If mentioning the ancestor dialects is important, we
could add that.

>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> +  "Major mode for editing Common Lisp code.

Here I'd prefer to mention CL without un-mentioning the other Lisps.
There's no reason to deny they exist or existed.

Thanks.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:16 ` Eli Zaretskii
@ 2021-06-29 18:25   ` João Távora
  2021-06-30 12:35     ` Eli Zaretskii
  2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-29 18:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Tue, Jun 29, 2021 at 7:16 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Tue, 29 Jun 2021 19:06:19 +0100
> > Cc: monnier@iro.umontreal.ca
> >
> > -  Lisp mode is the major mode for editing programs written in
> > -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
> > -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
> > -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> > +  Lisp mode is the major mode for editing programs written in Common
> > +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
> > +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
> > +end in @file{.l}, @file{.lsp}, or @file{.lisp}.
>
> This basically doesn't change anything, and the original text does
> mention CL.  If mentioning the ancestor dialects is important, we
> could add that.

The point is to make sure that noone is misinformed to think that
lisp-mode is a suitable ancestor for, say, scheme-mode or clojure-mode or
my-2021-lisp-mode.  At the time this was written, all the "general-purpose
Lisp dialects" (minus Scheme) would be handled by Lisp mode.  But
this is just not true anymore.  It's for Common Lisp and probably still
works decently for, say, the defunct MacLisp and Franz Lisp.

So it's not true that this doesn't change anything: it removes an
ambiguity. But I'm fine with any other phrasing that also removes
this ambiguity.  Make a proposal.

> >  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> > -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> > +  "Major mode for editing Common Lisp code.
>
> Here I'd prefer to mention CL without un-mentioning the other Lisps.
> There's no reason to deny they exist or existed.

That's true, I guess.  The point is to make sure that no one gets the
temptation to derive new Lisp-ish modes based on lisp-mode for
languages that have no relation to CL.  So what to you say to:

"Major mode for editing Common Lisp and historically related Lisps"

"Major mode for editing Common Lisp and its ancestors"

"Major mode for editing code historically related to Common Lisp"

?

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:16 ` Eli Zaretskii
  2021-06-29 18:25   ` João Távora
@ 2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-29 20:55     ` João Távora
  2021-06-30 12:37     ` Eli Zaretskii
  1 sibling, 2 replies; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-29 20:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: João Távora, 49278

>> +  Lisp mode is the major mode for editing programs written in Common
>> +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x

I think we should remove "or its ancestor dialects" here.

>>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
>> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
>> +  "Major mode for editing Common Lisp code.
> Here I'd prefer to mention CL without un-mentioning the other Lisps.
> There's no reason to deny they exist or existed.

The question is to describe what this major mode is designed to do.

People who want to look at Maclisp code (or other defunct dialects) will
probably want to use `lisp-mode` for the simple reason that Maclisp is
reasonably close to Common Lisp so it's the closest major mode we have
to offer, but the user should not expect correct handling of Maclisp in
those places where it differs from Common Lisp, because `lisp-mode` is
written specifically for Common Lisp and not for Maclisp: compatibility
with Maclisp has not been taken into account for more than 20
years, AFAIK.


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-29 20:55     ` João Távora
  2021-06-29 22:59       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 12:37     ` Eli Zaretskii
  1 sibling, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-29 20:55 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 49278

On Tue, Jun 29, 2021 at 9:46 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> >> +  Lisp mode is the major mode for editing programs written in Common
> >> +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
>
> I think we should remove "or its ancestor dialects" here.

That also works for me, but as you said, it might work reasonably
well for MacLisp etc, too.

> >>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> >> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> >> +  "Major mode for editing Common Lisp code.
> > Here I'd prefer to mention CL without un-mentioning the other Lisps.
> > There's no reason to deny they exist or existed.
>
> The question is to describe what this major mode is designed to do.
>
> People who want to look at Maclisp code (or other defunct dialects) will
> probably want to use `lisp-mode` for the simple reason that Maclisp is
> reasonably close to Common Lisp so it's the closest major mode we have
> to offer, but the user should not expect correct handling of Maclisp in
> those places where it differs from Common Lisp, because `lisp-mode` is
> written specifically for Common Lisp and not for Maclisp: compatibility
> with Maclisp has not been taken into account for more than 20
> years, AFAIK.

Yeah, but fair to say MacLisp hasn't evolved tremendously in
those years (and neither has Common Lisp sadly). So I reckon
lisp-mode wouldn't to a terrible job in most MacLisp programs.
And maybe even SLY and a modern Common Lisp compiler
could probably grok MacLisp or Franz Lisp code given sufficient
hand-holding.

Anyway, I hope the main point is across: remove suggestion
that it may be used to derive modes for _new_ lisps unrelated
to Common Lisp.

-- 
João Távora





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 20:55     ` João Távora
@ 2021-06-29 22:59       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 12:47         ` Eli Zaretskii
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-29 22:59 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, 49278

> Yeah, but fair to say MacLisp hasn't evolved tremendously in
> those years (and neither has Common Lisp sadly).

Same difference.  It only works for Maclisp to the extent that Maclisp
is similar to Common Lisp and not because `lisp-mode` is a major mode
for both Common Lisp and Maclisp.

> So I reckon lisp-mode wouldn't to a terrible job in most MacLisp
> programs.  And maybe even SLY and a modern Common Lisp compiler could
> probably grok MacLisp or Franz Lisp code given sufficient
> hand-holding.

IIRC they'd be surprised by the way arrays are treated:

    http://www.maclisp.info/pitmanual/array.html

or "hunks":

    http://www.maclisp.info/pitmanual/hunks.html

Also `lisp-mode` will happily misfontify and misindent `caseq` and `selectq`:

    http://www.maclisp.info/pitmanual/contro.html#CASEQ

[ There are significant incompatibilities, of course.  ]

The fact that such errors in the handling of Maclisp have not been
addressed in `lisp-mode` in all these years (despite that Maclisp has
been a very stable target during those years) shows clearly that
`lisp-mode` does not try to be a major mode for Maclisp.



        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:06 bug#49278: 28.0.50; Lisp Mode is for Common Lisp João Távora
  2021-06-29 18:16 ` Eli Zaretskii
@ 2021-06-30  3:50 ` Phil Hagelberg
  2021-06-30  9:44   ` João Távora
  2021-09-24 23:01 ` Stefan Kangas
  2 siblings, 1 reply; 52+ messages in thread
From: Phil Hagelberg @ 2021-06-30  3:50 UTC (permalink / raw)
  To: 49278

> In addition, there is in Emacs 27.1 a new lisp-data-mode.  That is
> useful for defining using define-derived-mode to make Lisp-like major
> modes derived from commonly found Lisp-style functionality such as
> parenthesis-matching syntax tables and such.

I don't think this is a very good argument; as the author of a major
mode for a lisp language, it never would have occurred to me to even
look at lisp-data-mode because its name indicates that it's not intended
for use writing programs. Yes, I know code is data, etc, but this name
still strongly implies a different use.

If the docstring for lisp-mode is to be changed, (rather than adding a
common-lisp-mode for common lisp like they should have done at the
outset) then it would be better if a replacement mode were introduced
which other lisp major modes could derive from. Otherwise there's no way
to enable paredit-mode (for instance) across all lisps. Deriving off
prog-mode isn't a very good solution there.

-Phil





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30  3:50 ` Phil Hagelberg
@ 2021-06-30  9:44   ` João Távora
  0 siblings, 0 replies; 52+ messages in thread
From: João Távora @ 2021-06-30  9:44 UTC (permalink / raw)
  To: Phil Hagelberg; +Cc: 49278

On Wed, Jun 30, 2021 at 4:51 AM Phil Hagelberg <phil@hagelb.org> wrote:
>
> > In addition, there is in Emacs 27.1 a new lisp-data-mode.  That is
> > useful for defining using define-derived-mode to make Lisp-like major
> > modes derived from commonly found Lisp-style functionality such as
> > parenthesis-matching syntax tables and such.
>
> I don't think this is a very good argument; as the author of a major
> mode for a lisp language, it never would have occurred to me to even
> look at lisp-data-mode because its name indicates that it's not intended
> for use writing programs. Yes, I know code is data, etc, but this name
> still strongly implies a different use.

Maybe you were using an old Emacs, else reading  the manual at
"Example modes" would give you an example. And if you know code
is data in Lisp, chances are other Lisp enthusiasts also know that.
The manual reference isn't much, but it's not like Lisp is the biggest
thing out there anyway, so I don't know if a full section on this base
mode is worth it.

But if the name is bugging you, Stefan once proposed "lispish-mode".
I think it's very slightly silly, and the current name is accurate in meaning,
but we could make a snazzier alias.

> If the docstring for lisp-mode is to be changed, (rather than adding a
> common-lisp-mode for common lisp like they should have done at the
> outset)

This is a tangent: but the outset was probably before Common Lisp
was a thing.  The first VCS-checked version of that file is from 1991,
but I suspect it was around for much longer.  At the time, people were
really trying to kill off their own Lisps and meeting expensively in committees
to converge into a shiny new language.  So Common Lisp mode was really
to become "the Lisp".

> hen it would be better if a replacement mode were introduced
> which other lisp major modes could derive from. Otherwise there's no way
> to enable paredit-mode (for instance) across all lisps. Deriving off
> prog-mode isn't a very good solution there.

Yes, this is why the prescription is to derive from lisp-data-mode.  And
you can (add-hook 'lisp-data-mode 'paredit-mode).

If you want to make scheme mode and clojure mode and such
derive from lisp-data-mode, it's probably not very hard: patches
welcome.

But here I'm just correcting a bug in the documentation.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:25   ` João Távora
@ 2021-06-30 12:35     ` Eli Zaretskii
  2021-06-30 12:45       ` João Távora
  0 siblings, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 12:35 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Tue, 29 Jun 2021 19:25:45 +0100
> Cc: 49278@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
> 
> > > -  Lisp mode is the major mode for editing programs written in
> > > -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
> > > -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
> > > -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> > > +  Lisp mode is the major mode for editing programs written in Common
> > > +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
> > > +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
> > > +end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> >
> > This basically doesn't change anything, and the original text does
> > mention CL.  If mentioning the ancestor dialects is important, we
> > could add that.
> 
> The point is to make sure that noone is misinformed to think that
> lisp-mode is a suitable ancestor for, say, scheme-mode or clojure-mode or
> my-2021-lisp-mode.

We can mention Scheme and Clojure there (as examples of languages that
are NOT handled), if that's the issue.  Or maybe you can describe
those dialects that you'd like to exempt in some more general way?

> So it's not true that this doesn't change anything: it removes an
> ambiguity.

Not in my eyes, no.  I think you assign too much significance to the
"ancestor" part, and rely on the reader to understand that
significance.

> > >  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> > > -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> > > +  "Major mode for editing Common Lisp code.
> >
> > Here I'd prefer to mention CL without un-mentioning the other Lisps.
> > There's no reason to deny they exist or existed.
> 
> That's true, I guess.  The point is to make sure that no one gets the
> temptation to derive new Lisp-ish modes based on lisp-mode for
> languages that have no relation to CL.  So what to you say to:
> 
> "Major mode for editing Common Lisp and historically related Lisps"
> 
> "Major mode for editing Common Lisp and its ancestors"
> 
> "Major mode for editing code historically related to Common Lisp"

Again, I'd like to understand better what misunderstandings are you
trying to prevent.  If we are only talking about Scheme and Clojure, I
think it's easier to mention them explicitly.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-29 20:55     ` João Távora
@ 2021-06-30 12:37     ` Eli Zaretskii
  2021-06-30 13:03       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 12:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: joaotavora, 49278

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: João Távora <joaotavora@gmail.com>,
>   49278@debbugs.gnu.org
> Date: Tue, 29 Jun 2021 16:46:10 -0400
> 
> >>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> >> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> >> +  "Major mode for editing Common Lisp code.
> > Here I'd prefer to mention CL without un-mentioning the other Lisps.
> > There's no reason to deny they exist or existed.
> 
> The question is to describe what this major mode is designed to do.

How do you suggest to do that in a concise enough way appropriate for
a doc string?

> People who want to look at Maclisp code (or other defunct dialects) will
> probably want to use `lisp-mode` for the simple reason that Maclisp is
> reasonably close to Common Lisp so it's the closest major mode we have
> to offer, but the user should not expect correct handling of Maclisp in
> those places where it differs from Common Lisp, because `lisp-mode` is
> written specifically for Common Lisp and not for Maclisp: compatibility
> with Maclisp has not been taken into account for more than 20
> years, AFAIK.

Did lisp-mode.el changed significantly during those 20 years? did
Maclisp change significantly?  If not, we don't have a problem more
that we had it back then, do we?





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 12:35     ` Eli Zaretskii
@ 2021-06-30 12:45       ` João Távora
  0 siblings, 0 replies; 52+ messages in thread
From: João Távora @ 2021-06-30 12:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 1:35 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Tue, 29 Jun 2021 19:25:45 +0100
> > Cc: 49278@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
> >
> > > > -  Lisp mode is the major mode for editing programs written in
> > > > -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
> > > > -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
> > > > -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> > > > +  Lisp mode is the major mode for editing programs written in Common
> > > > +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
> > > > +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
> > > > +end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> > >
> > > This basically doesn't change anything, and the original text does
> > > mention CL.  If mentioning the ancestor dialects is important, we
> > > could add that.
> >
> > The point is to make sure that noone is misinformed to think that
> > lisp-mode is a suitable ancestor for, say, scheme-mode or clojure-mode or
> > my-2021-lisp-mode.
>
> We can mention Scheme and Clojure there (as examples of languages that
> are NOT handled), if that's the issue.  Or maybe you can describe
> those dialects that you'd like to exempt in some more general way?

Here's a very good  way: dialects that are _not_ Common Lisp or its
ancestors.  Which is what I wrote.  But Stefan goes even farther and
would probably phrase it: dialetcts that are _not_ Common Lisp _period_.
He's probably right.  Lisp mode is only for Common Lisp (or for some
language you invent that is a superset of Common Lisp).

> > So it's not true that this doesn't change anything: it removes an
> > ambiguity.
>
> Not in my eyes, no.  I think you assign too much significance to the
> "ancestor" part, and rely on the reader to understand that
> significance.

`lisp-mode` shuoldn't be used for editing other things than Common Lisp.
It's _that_ simple. Neither should it be used as an ancestor for derived
modes which aim to edit languages that are not a superset of Common
Lisp.  I think it's pretty obvious that current phrasing makes this action
plausible, when in reality it's a mistake.  It will bring problems to this
hypothetical developer.

Don't know how else to explain it.

> > > >  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> > > > -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> > > > +  "Major mode for editing Common Lisp code.
> > >
> > > Here I'd prefer to mention CL without un-mentioning the other Lisps.
> > > There's no reason to deny they exist or existed.
> >
> > That's true, I guess.  The point is to make sure that no one gets the
> > temptation to derive new Lisp-ish modes based on lisp-mode for
> > languages that have no relation to CL.  So what to you say to:
> >
> > "Major mode for editing Common Lisp and historically related Lisps"
> >
> > "Major mode for editing Common Lisp and its ancestors"
> >
> > "Major mode for editing code historically related to Common Lisp"
>
> Again, I'd like to understand better what misunderstandings are you
> trying to prevent.

Case in point: Phil Hagelberg in this discussion developed a Lisp-like
language, called "fennel" I believe.  I believe he developed it in the
recent past. He used `lisp-mode` as the ancestor in `define-derived-mode`.
Because other long-running extensions for Common Lisp specifically
rely on lisp-mode-hook (which again, is for Common Lisp exclusively),
the presence of those extensions introduces problems that Phil has to
work around in this fennel-mode.el file.  He also has to write more
code than we would have needed if he had used lisp-data-mode.

As far as I can tell, Phil used lisp-mode as an ancestor because
no lisp-data-mode was available/visible to him and because he
wanted to reuse some Lisp-editing code.  A worthy goal. But because
of lisp-mode's proven specificity to Common Lisp, he also bought
himself some conflicts (that somehow the developers of Scheme mode
and Clojure mode managed to avoid). So the docstring fixes aim to
prevent that mistake.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 22:59       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-30 12:47         ` Eli Zaretskii
  0 siblings, 0 replies; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 12:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: joaotavora, 49278

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  49278@debbugs.gnu.org
> Date: Tue, 29 Jun 2021 18:59:29 -0400
> 
> Same difference.  It only works for Maclisp to the extent that Maclisp
> is similar to Common Lisp and not because `lisp-mode` is a major mode
> for both Common Lisp and Maclisp.
> 
> > So I reckon lisp-mode wouldn't to a terrible job in most MacLisp
> > programs.  And maybe even SLY and a modern Common Lisp compiler could
> > probably grok MacLisp or Franz Lisp code given sufficient
> > hand-holding.
> 
> IIRC they'd be surprised by the way arrays are treated:
> 
>     http://www.maclisp.info/pitmanual/array.html
> 
> or "hunks":
> 
>     http://www.maclisp.info/pitmanual/hunks.html
> 
> Also `lisp-mode` will happily misfontify and misindent `caseq` and `selectq`:
> 
>     http://www.maclisp.info/pitmanual/contro.html#CASEQ
> 
> [ There are significant incompatibilities, of course.  ]
> 
> The fact that such errors in the handling of Maclisp have not been
> addressed in `lisp-mode` in all these years (despite that Maclisp has
> been a very stable target during those years) shows clearly that
> `lisp-mode` does not try to be a major mode for Maclisp.

We could say something about that to lower user expectations.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 12:37     ` Eli Zaretskii
@ 2021-06-30 13:03       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 13:21         ` João Távora
  2021-06-30 13:29         ` Eli Zaretskii
  0 siblings, 2 replies; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-30 13:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: joaotavora, 49278

> How do you suggest to do that in a concise enough way appropriate for
> a doc string?

See patch below.

> >>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> >> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> >> +  "Major mode for editing Common Lisp code.


> Did lisp-mode.el changed significantly during those 20 years?  did
> Maclisp change significantly?  If not, we don't have a problem more
> that we had it back then, do we?

The problem is indeed not new, it's the same as 20 years ago.
It's just that noone bothered to fix it.


        Stefan


diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 59325d647d..99bf1a98c2 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -765,7 +765,7 @@ lisp-mode-menu
      :help "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'"]))
 
 (define-derived-mode lisp-mode lisp-data-mode "Lisp"
-  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
+  "Major mode for editing Common Lisp code.
 Commands:
 Delete converts tabs to spaces as it moves back.
 Blank lines separate paragraphs.  Semicolons start comments.






^ permalink raw reply related	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:03       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-30 13:21         ` João Távora
  2021-06-30 13:29         ` Eli Zaretskii
  1 sibling, 0 replies; 52+ messages in thread
From: João Távora @ 2021-06-30 13:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 49278

On Wed, Jun 30, 2021 at 2:03 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > How do you suggest to do that in a concise enough way appropriate for
> > a doc string?
>
> See patch below.
>
> > >>  (define-derived-mode lisp-mode lisp-data-mode "Lisp"
> > >> -  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
> > >> +  "Major mode for editing Common Lisp code.

Fine with me.

> > Did lisp-mode.el changed significantly during those 20 years?  did
> > Maclisp change significantly?  If not, we don't have a problem more
> > that we had it back then, do we?
>
> The problem is indeed not new, it's the same as 20 years ago.
> It's just that noone bothered to fix it.

...because noone really uses MacLisp :-)  Or Lisp in general :-(

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:03       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 13:21         ` João Távora
@ 2021-06-30 13:29         ` Eli Zaretskii
  2021-06-30 13:32           ` João Távora
  1 sibling, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 13:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: joaotavora, 49278

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: joaotavora@gmail.com,  49278@debbugs.gnu.org
> Date: Wed, 30 Jun 2021 09:03:01 -0400
> 
> > How do you suggest to do that in a concise enough way appropriate for
> > a doc string?
> 
> See patch below.

I cannot accept that, sorry.  At least not yet.

I actually still don't understand what practical problem are we trying
to solve here.  There's no code change, so what the code did until now
it will continue to do henceforth.  CL and other lisps also won't
change by virtue of this patch.  So why do we worry what those doc
strings say?

> The problem is indeed not new, it's the same as 20 years ago.
> It's just that noone bothered to fix it.

Fix what? what is the problem?





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:29         ` Eli Zaretskii
@ 2021-06-30 13:32           ` João Távora
  2021-06-30 13:51             ` Eli Zaretskii
  0 siblings, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-30 13:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 2:29 PM Eli Zaretskii <eliz@gnu.org> wrote:
> Fix what? what is the problem?

The docstring is misleading!  It tells you that you may
use lisp-mode to edit Lisps other than GNU Emacs Lisp
and that is completely false. The only other such Lisp
is Common Lisp.  For mode developers it also misleads
into thinking that lisp-mode is an acceptable ancestor
to use for a new Lisp-like major mode that isn't GNU
Emacs Lisp.  That is also false.

So correcting the misleading statement is a good idea.

João





-- 
João Távora





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:32           ` João Távora
@ 2021-06-30 13:51             ` Eli Zaretskii
  2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 14:54               ` João Távora
  0 siblings, 2 replies; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 13:51 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Wed, 30 Jun 2021 14:32:40 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> 
> On Wed, Jun 30, 2021 at 2:29 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > Fix what? what is the problem?
> 
> The docstring is misleading!

Your changes were not only for the doc string.  But if you want to
focus on the doc string, would the following be okay?

  Major mode for editing programs in Common Lisp and other similar Lisps.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:51             ` Eli Zaretskii
@ 2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 14:50                 ` João Távora
  2021-06-30 15:52                 ` Eli Zaretskii
  2021-06-30 14:54               ` João Távora
  1 sibling, 2 replies; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-30 14:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: João Távora, 49278

> Your changes were not only for the doc string.  But if you want to
> focus on the doc string, would the following be okay?
>
>   Major mode for editing programs in Common Lisp and other similar Lisps.

It'd be a big improvement, yes, thanks.


        Stefan


PS: I would still find it to be a lie because I can't see any place in
the code that aims to support "other similar Lisps".






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-30 14:50                 ` João Távora
  2021-06-30 15:54                   ` Eli Zaretskii
  2021-06-30 15:52                 ` Eli Zaretskii
  1 sibling, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-30 14:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 49278

On Wed, Jun 30, 2021 at 3:32 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > Your changes were not only for the doc string.  But if you want to
> > focus on the doc string, would the following be okay?
> >
> >   Major mode for editing programs in Common Lisp and other similar Lisps.
>
> It'd be a big improvement, yes, thanks.

I concur. A big improvement.

> PS: I would still find it to be a lie because I can't see any place in
> the code that aims to support "other similar Lisps".

Also, the concept of "similarity" isn't very well defined. Scheme and
CL may look similar to many, whereas in reality there are worlds of
difference depending on your knowledge.

So I'd really stick with "ancestor Lisps" or "related Lisps".  But
your proposal is a good improvement Eli.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 13:51             ` Eli Zaretskii
  2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-30 14:54               ` João Távora
  2021-06-30 15:55                 ` Eli Zaretskii
  1 sibling, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-30 14:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 2:51 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Wed, 30 Jun 2021 14:32:40 +0100
> > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> >
> > On Wed, Jun 30, 2021 at 2:29 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > > Fix what? what is the problem?
> >
> > The docstring is misleading!
>
> Your changes were not only for the doc string.

True.  And that's because I think that sentence in the manual
which I proposed changing conveys the same fundamental
misunderstanding.  It says:

> Lisp mode is the major mode for editing programs written in
> general-purpose Lisp dialects, such as Common Lisp.

But that is false :-)  Scheme, Clojure and Phil's Fennel are two
"general purpose Lisp dialects" that are not at all well suited
to be edited with lisp-mode in Emacs.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 14:50                 ` João Távora
@ 2021-06-30 15:52                 ` Eli Zaretskii
  2021-06-30 16:37                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 15:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: joaotavora, 49278

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: João Távora <joaotavora@gmail.com>,
>   49278@debbugs.gnu.org
> Date: Wed, 30 Jun 2021 10:32:51 -0400
> 
> > Your changes were not only for the doc string.  But if you want to
> > focus on the doc string, would the following be okay?
> >
> >   Major mode for editing programs in Common Lisp and other similar Lisps.
> 
> It'd be a big improvement, yes, thanks.

Thanks.

> PS: I would still find it to be a lie because I can't see any place in
> the code that aims to support "other similar Lisps".

If they are similar enough, there's no need for such special places in
the code.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 14:50                 ` João Távora
@ 2021-06-30 15:54                   ` Eli Zaretskii
  2021-06-30 16:02                     ` João Távora
  0 siblings, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 15:54 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Wed, 30 Jun 2021 15:50:56 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, 49278@debbugs.gnu.org
> 
> On Wed, Jun 30, 2021 at 3:32 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >
> > > Your changes were not only for the doc string.  But if you want to
> > > focus on the doc string, would the following be okay?
> > >
> > >   Major mode for editing programs in Common Lisp and other similar Lisps.
> >
> > It'd be a big improvement, yes, thanks.
> 
> I concur. A big improvement.

Then let's install this.

What about the change to the manual?





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 14:54               ` João Távora
@ 2021-06-30 15:55                 ` Eli Zaretskii
  2021-06-30 15:58                   ` João Távora
  0 siblings, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 15:55 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Wed, 30 Jun 2021 15:54:39 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> 
> > Lisp mode is the major mode for editing programs written in
> > general-purpose Lisp dialects, such as Common Lisp.
> 
> But that is false :-)  Scheme, Clojure and Phil's Fennel are two
> "general purpose Lisp dialects" that are not at all well suited
> to be edited with lisp-mode in Emacs.

Would it be okay to mention those 3 exceptions explicitly?





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 15:55                 ` Eli Zaretskii
@ 2021-06-30 15:58                   ` João Távora
  2021-06-30 16:49                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-30 15:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 4:55 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Wed, 30 Jun 2021 15:54:39 +0100
> > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> >
> > > Lisp mode is the major mode for editing programs written in
> > > general-purpose Lisp dialects, such as Common Lisp.
> >
> > But that is false :-)  Scheme, Clojure and Phil's Fennel are two
> > "general purpose Lisp dialects" that are not at all well suited
> > to be edited with lisp-mode in Emacs.
>
> Would it be okay to mention those 3 exceptions explicitly?

I guess, but there are probably many more Lisp dialects
out there.  It's just more economical to state it the other way
round, right? But with the change to the lisp-mode docstring
I think we're already in a better place.

(As you may guess, I still don't see what the problem in
saying "for editing Common Lisp and languages directly related
to it" is.  It's short  and accurate.

Though even shorter and more accurate, as Stefan pointed out is
"for editing Common Lisp".)

João Távora





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 15:54                   ` Eli Zaretskii
@ 2021-06-30 16:02                     ` João Távora
  0 siblings, 0 replies; 52+ messages in thread
From: João Távora @ 2021-06-30 16:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 4:54 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Wed, 30 Jun 2021 15:50:56 +0100
> > Cc: Eli Zaretskii <eliz@gnu.org>, 49278@debbugs.gnu.org
> >
> > On Wed, Jun 30, 2021 at 3:32 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > >
> > > > Your changes were not only for the doc string.  But if you want to
> > > > focus on the doc string, would the following be okay?
> > > >
> > > >   Major mode for editing programs in Common Lisp and other similar Lisps.
> > >
> > > It'd be a big improvement, yes, thanks.
> >
> > I concur. A big improvement.
>
> Then let's install this.

Done.

> What about the change to the manual?

Still think it should be done, but it's not ultra-important.  It's in
a section about a part of Emacs almost noone uses nowadays,
because `run-inferior-lisp` has been superceded by programs
such as SLY and SLIME.  It's just inaccurate in its mention of
lisp-mode, as I explained.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 15:52                 ` Eli Zaretskii
@ 2021-06-30 16:37                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-06-30 16:47                     ` Eli Zaretskii
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-30 16:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: joaotavora, 49278

> If they are similar enough, there's no need for such special places in
> the code.

But then the "and other similar Foos" should be added to all our major
modes, since that's also true for them.  E.g. how 'bout:

    @@ -2608,7 +2608,7 @@ c-c-menu
     
     ;;;###autoload
     (define-derived-mode c-mode prog-mode "C"
    -  "Major mode for editing C code.
    +  "Major mode for editing C code and other similar languages.
     
     To submit a problem report, enter `\\[c-submit-bug-report]' from a
     c-mode buffer.  This automatically sets up a mail buffer with version

After all, I've used `c-mode` for Lex and Yacc files in the past (and
we still use it for XPM files).


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 16:37                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-06-30 16:47                     ` Eli Zaretskii
  2021-06-30 16:50                       ` João Távora
  0 siblings, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 16:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: joaotavora, 49278

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: joaotavora@gmail.com,  49278@debbugs.gnu.org
> Date: Wed, 30 Jun 2021 12:37:24 -0400
> 
> > If they are similar enough, there's no need for such special places in
> > the code.
> 
> But then the "and other similar Foos" should be added to all our major
> modes, since that's also true for them.  E.g. how 'bout:
> 
>     @@ -2608,7 +2608,7 @@ c-c-menu
>      
>      ;;;###autoload
>      (define-derived-mode c-mode prog-mode "C"
>     -  "Major mode for editing C code.
>     +  "Major mode for editing C code and other similar languages.

I don't mind.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 15:58                   ` João Távora
@ 2021-06-30 16:49                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-06-30 16:49 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, 49278

>> > But that is false :-)  Scheme, Clojure and Phil's Fennel are two
>> > "general purpose Lisp dialects" that are not at all well suited
>> > to be edited with lisp-mode in Emacs.
>> Would it be okay to mention those 3 exceptions explicitly?
> I guess, but there are probably many more Lisp dialects
> out there.

Definitely.  TXR, AutoLisp, Bel, Sisu, and Racket come to mind.
I'd be surprised if there aren't another ten or so out there.


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 16:47                     ` Eli Zaretskii
@ 2021-06-30 16:50                       ` João Távora
  2021-06-30 16:55                         ` Eli Zaretskii
  0 siblings, 1 reply; 52+ messages in thread
From: João Távora @ 2021-06-30 16:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 5:47 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Cc: joaotavora@gmail.com,  49278@debbugs.gnu.org
> > Date: Wed, 30 Jun 2021 12:37:24 -0400
> >
> > > If they are similar enough, there's no need for such special places in
> > > the code.
> >
> > But then the "and other similar Foos" should be added to all our major
> > modes, since that's also true for them.  E.g. how 'bout:
> >
> >     @@ -2608,7 +2608,7 @@ c-c-menu
> >
> >      ;;;###autoload
> >      (define-derived-mode c-mode prog-mode "C"
> >     -  "Major mode for editing C code.
> >     +  "Major mode for editing C code and other similar languages.
>
> I don't mind.

Come on, don't do this. A major mode is only for editing programs
of a given language or other languages that are a superset of that
language.

Major mode for language X is only good for programs written for
X or for programs written for Y that happen to be compatible with
X. The concept of "similarity" is just too vague to use here.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 16:50                       ` João Távora
@ 2021-06-30 16:55                         ` Eli Zaretskii
  2021-06-30 16:58                           ` João Távora
  0 siblings, 1 reply; 52+ messages in thread
From: Eli Zaretskii @ 2021-06-30 16:55 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

> From: João Távora <joaotavora@gmail.com>
> Date: Wed, 30 Jun 2021 17:50:03 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> 
> On Wed, Jun 30, 2021 at 5:47 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > > Cc: joaotavora@gmail.com,  49278@debbugs.gnu.org
> > > Date: Wed, 30 Jun 2021 12:37:24 -0400
> > >
> > > > If they are similar enough, there's no need for such special places in
> > > > the code.
> > >
> > > But then the "and other similar Foos" should be added to all our major
> > > modes, since that's also true for them.  E.g. how 'bout:
> > >
> > >     @@ -2608,7 +2608,7 @@ c-c-menu
> > >
> > >      ;;;###autoload
> > >      (define-derived-mode c-mode prog-mode "C"
> > >     -  "Major mode for editing C code.
> > >     +  "Major mode for editing C code and other similar languages.
> >
> > I don't mind.
> 
> Come on, don't do this.

I'm not doing anything.  I was asked a question, and I answered it.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-30 16:55                         ` Eli Zaretskii
@ 2021-06-30 16:58                           ` João Távora
  0 siblings, 0 replies; 52+ messages in thread
From: João Távora @ 2021-06-30 16:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 49278

On Wed, Jun 30, 2021 at 5:55 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: João Távora <joaotavora@gmail.com>
> > Date: Wed, 30 Jun 2021 17:50:03 +0100
> > Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 49278@debbugs.gnu.org
> >
> > On Wed, Jun 30, 2021 at 5:47 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > > > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > > > Cc: joaotavora@gmail.com,  49278@debbugs.gnu.org
> > > > Date: Wed, 30 Jun 2021 12:37:24 -0400
> > > >
> > > > > If they are similar enough, there's no need for such special places in
> > > > > the code.
> > > >
> > > > But then the "and other similar Foos" should be added to all our major
> > > > modes, since that's also true for them.  E.g. how 'bout:
> > > >
> > > >     @@ -2608,7 +2608,7 @@ c-c-menu
> > > >
> > > >      ;;;###autoload
> > > >      (define-derived-mode c-mode prog-mode "C"
> > > >     -  "Major mode for editing C code.
> > > >     +  "Major mode for editing C code and other similar languages.
> > >
> > > I don't mind.
> >
> > Come on, don't do this.
>
> I'm not doing anything.  I was asked a question, and I answered it.

Sure, and I just volunteered my objection to the idea.

Anyway, if you want to close this bug, I think I'm good
(it could be a little more accurate, but I'm fine with
the results now).

-- 
João Távora





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-06-29 18:06 bug#49278: 28.0.50; Lisp Mode is for Common Lisp João Távora
  2021-06-29 18:16 ` Eli Zaretskii
  2021-06-30  3:50 ` Phil Hagelberg
@ 2021-09-24 23:01 ` Stefan Kangas
  2021-09-24 23:23   ` João Távora
  2 siblings, 1 reply; 52+ messages in thread
From: Stefan Kangas @ 2021-09-24 23:01 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

João Távora <joaotavora@gmail.com> writes:

> diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
> index 8de93867ba..7d655449c5 100644
> --- a/doc/emacs/building.texi
> +++ b/doc/emacs/building.texi
> @@ -1764,10 +1764,10 @@ External Lisp
>  @cindex mode, Lisp
>  @cindex Common Lisp
>
> -  Lisp mode is the major mode for editing programs written in
> -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
> -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
> -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
> +  Lisp mode is the major mode for editing programs written in Common
> +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
> +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
> +end in @file{.l}, @file{.lsp}, or @file{.lisp}.
>
>  @findex run-lisp
>  @vindex inferior-lisp-program

This change was never installed, was it?

It would be good if we could install this fix.  As the discussion in
this bug report has shown, what the text says now is completely wrong.

I think saying "programs written in Common Lisp" is good, and leaving
the "ancestor dialects" part out of it.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-24 23:01 ` Stefan Kangas
@ 2021-09-24 23:23   ` João Távora
  2021-09-25  0:22     ` Stefan Kangas
  2021-09-25  1:13     ` bug#49278: [External] : " Drew Adams
  0 siblings, 2 replies; 52+ messages in thread
From: João Távora @ 2021-09-24 23:23 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: monnier, 49278

Stefan Kangas <stefan@marxist.se> writes:

> João Távora <joaotavora@gmail.com> writes:
>
>> diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
>> index 8de93867ba..7d655449c5 100644
>> --- a/doc/emacs/building.texi
>> +++ b/doc/emacs/building.texi
>> @@ -1764,10 +1764,10 @@ External Lisp
>>  @cindex mode, Lisp
>>  @cindex Common Lisp
>>
>> -  Lisp mode is the major mode for editing programs written in
>> -general-purpose Lisp dialects, such as Common Lisp.  Its mode command
>> -is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
>> -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
>> +  Lisp mode is the major mode for editing programs written in Common
>> +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
>> +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
>> +end in @file{.l}, @file{.lsp}, or @file{.lisp}.
>>
>>  @findex run-lisp
>>  @vindex inferior-lisp-program
>
> This change was never installed, was it?

No, we never decided on the wording, so only the change to the docstring
was installed.

> I think saying "programs written in Common Lisp" is good, and leaving
> the "ancestor dialects" part out of it.

I agree.  That's Stefan M.'s position too.  But it's not Eli's.

João

PS: Instead of "ancestor dialects", we could also say "related dialects"
if that is somewhat seen as a better middle ground.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-24 23:23   ` João Távora
@ 2021-09-25  0:22     ` Stefan Kangas
  2021-09-25  1:26       ` bug#49278: [External] : " Drew Adams
                         ` (2 more replies)
  2021-09-25  1:13     ` bug#49278: [External] : " Drew Adams
  1 sibling, 3 replies; 52+ messages in thread
From: Stefan Kangas @ 2021-09-25  0:22 UTC (permalink / raw)
  To: João Távora; +Cc: monnier, 49278

João Távora <joaotavora@gmail.com> writes:

> No, we never decided on the wording, so only the change to the docstring
> was installed.

OK, this is what I think we should install.  Any objections?

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 8de93867ba..bdddc83f2a 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1764,10 +1764,10 @@ External Lisp
 @cindex mode, Lisp
 @cindex Common Lisp

-  Lisp mode is the major mode for editing programs written in
-general-purpose Lisp dialects, such as Common Lisp.  Its mode command
-is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode automatically for files
-whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
+  Lisp mode is the major mode for editing programs written in Common
+Lisp.  Its mode command is @kbd{M-x lisp-mode}.  Emacs uses Lisp mode
+automatically for files whose names end in @file{.l}, @file{.lsp}, or
+@file{.lisp}.

 @findex run-lisp
 @vindex inferior-lisp-program





^ permalink raw reply related	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-24 23:23   ` João Távora
  2021-09-25  0:22     ` Stefan Kangas
@ 2021-09-25  1:13     ` Drew Adams
  2021-09-25  9:02       ` João Távora
  1 sibling, 1 reply; 52+ messages in thread
From: Drew Adams @ 2021-09-25  1:13 UTC (permalink / raw)
  To: João Távora, Stefan Kangas
  Cc: monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

> No, we never decided on the wording, so only the change to the
> docstring
> was installed.
> 
> > I think saying "programs written in Common Lisp" is good, and leaving
> > the "ancestor dialects" part out of it.
> 
> I agree.  That's Stefan M.'s position too.  But it's not Eli's.
> 
> João
> 
> PS: Instead of "ancestor dialects", we could also say "related
> dialects"
> if that is somewhat seen as a better middle ground.

I would just say "some Lisps, such as Common Lisp".

No talk of "ancestors", no suggestion of something
being newer or older, no suggestion that it is only
for "dialects" similar to Common Lisp.

If you want to specifically say something concrete
about its differences from other modes that support
other Lisps, do so.  If this mode is not particularly
appropriate for some dialects, maybe say why, or call
out those dialects.

If, as has been claimed, the change in language is
to avoid misunderstanding and misleading, then do
that, really.  Don't wave hands or beat around the
bush.  Be concrete and helpful.

Just one opinion, ignorant of the details - about
both the languages hinted at and the mode features
that make it (in)appropriate for this or that Lisp.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  0:22     ` Stefan Kangas
@ 2021-09-25  1:26       ` Drew Adams
  2021-09-25  1:35       ` Lars Ingebrigtsen
  2021-09-25  6:42       ` Eli Zaretskii
  2 siblings, 0 replies; 52+ messages in thread
From: Drew Adams @ 2021-09-25  1:26 UTC (permalink / raw)
  To: Stefan Kangas, João Távora
  Cc: monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

> OK, this is what I think we should install.  Any objections?

Yes.  I provided my suggestions and reasons in an
earlier reply today.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  0:22     ` Stefan Kangas
  2021-09-25  1:26       ` bug#49278: [External] : " Drew Adams
@ 2021-09-25  1:35       ` Lars Ingebrigtsen
  2021-09-25  6:42       ` Eli Zaretskii
  2 siblings, 0 replies; 52+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-25  1:35 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: João Távora, monnier, 49278

Stefan Kangas <stefan@marxist.se> writes:

> OK, this is what I think we should install.  Any objections?

Looks good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  0:22     ` Stefan Kangas
  2021-09-25  1:26       ` bug#49278: [External] : " Drew Adams
  2021-09-25  1:35       ` Lars Ingebrigtsen
@ 2021-09-25  6:42       ` Eli Zaretskii
  2 siblings, 0 replies; 52+ messages in thread
From: Eli Zaretskii @ 2021-09-25  6:42 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: joaotavora, monnier, 49278

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 24 Sep 2021 17:22:12 -0700
> Cc: monnier@iro.umontreal.ca, 49278@debbugs.gnu.org
> 
> João Távora <joaotavora@gmail.com> writes:
> 
> > No, we never decided on the wording, so only the change to the docstring
> > was installed.
> 
> OK, this is what I think we should install.  Any objections?

Yes, I don't think we should install this, for the reasons I explained
in the previous discussion.  Nothing's changed, so please consider
this issue as closed.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  1:13     ` bug#49278: [External] : " Drew Adams
@ 2021-09-25  9:02       ` João Távora
  2021-09-25 16:03         ` Drew Adams
  2021-09-27 14:48         ` Jean Louis
  0 siblings, 2 replies; 52+ messages in thread
From: João Távora @ 2021-09-25  9:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

Drew Adams <drew.adams@oracle.com> writes:

> I would just say "some Lisps, such as Common Lisp".

Since lisp-mode doesn't work for any Lisp other than Common Lisp, that
would be misleading.  People'll use it for their XYZ Lisp flavor, and
it'll break.

> If this mode is not particularly appropriate for some dialects, maybe
> say why

"Because it's only appropriate for Common Lisp."  Good enough?

> , or call out those dialects.

You realize there's a very large number of those, right?  When you write
an email, you don't sign it "Not João, not Lars, not any of the
Stefans".  You sign it: "Drew".  Because it's easier.

> If, as has been claimed, the change in language is
> to avoid misunderstanding and misleading, then do
> that, really.  Don't wave hands or beat around the
> bush.  Be concrete and helpful.

Who's beating around the bush?  I only see one person writing
paragraph-fulls of objections to a plain, simple and obvious a 2
line-patch.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  9:02       ` João Távora
@ 2021-09-25 16:03         ` Drew Adams
  2021-09-25 16:43           ` Stefan Kangas
  2021-09-27 20:10           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-27 14:48         ` Jean Louis
  1 sibling, 2 replies; 52+ messages in thread
From: Drew Adams @ 2021-09-25 16:03 UTC (permalink / raw)
  To: João Távora
  Cc: Stefan Kangas, monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

> > I would just say "some Lisps, such as Common Lisp".
> 
> Since lisp-mode doesn't work for any Lisp other than Common Lisp,

There's no way to be sure of that, especially wrt
the future.

The point is that this is a mode that _can_ be
used with _some_ Lisps.  YMMV with another Lisp
you try to use it with.

And in particular, Common Lisp is a Lisp you
can probably use this mode with, to advantage.

Both of those pieces of info are helpful.

> that would be misleading.  People'll use it for
> their XYZ Lisp flavor, and it'll break.

Only if it happens to break XYZ Lisp.  Since
XYZ's a placeholder for an arbitrary supposed
Lisp, there's no reason to say it _will_ break
for all XYZ.
 
> > If this mode is not particularly appropriate
> > for some dialects, maybe say why
> 
> "Because it's only appropriate for Common Lisp."  Good enough?

No.  We don't know that.  We can't know that.

What we can say is that it _is_, for most purposes,
usable with Common Lisp code.  It _might_ be useful
for some other Lisps as well.

> > , or call out those dialects.
> 
> You realize there's a very large number of those, right?

You _can_ mention any dialects for which you
particularly want to let users know (1) this mode
might not be appropriate, or (2) there are modes
that are more appropriate.

Or you _can_ choose _not_ to mention any particular
modes for which you think the mode is inappropriate.

It's enough to say that the mode is appropriate for
some Lisps, including Common Lisp, and it might not
be appropriate for some other Lisps.

But if you think it's helpful to draw attention to
some other Lisps for which the mode might be
problematic, particularly Lisps for which there is
a better mode, then do so.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25 16:03         ` Drew Adams
@ 2021-09-25 16:43           ` Stefan Kangas
  2021-09-25 17:24             ` Drew Adams
  2021-09-27 20:10           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 52+ messages in thread
From: Stefan Kangas @ 2021-09-25 16:43 UTC (permalink / raw)
  To: Drew Adams, João Távora
  Cc: monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> "Because it's only appropriate for Common Lisp."  Good enough?
>
> No.  We don't know that.  We can't know that.

Yes we do, actually.  We know it won't work with any of the
overwhelmingly most popular Lisps out there (Scheme, Clojure, Racket).

If there is some random small Lisp dialect, it may or may not work.
According to Stefan M, no particular effort has been made for the last
20 years to support anything but Common Lisp.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25 16:43           ` Stefan Kangas
@ 2021-09-25 17:24             ` Drew Adams
  0 siblings, 0 replies; 52+ messages in thread
From: Drew Adams @ 2021-09-25 17:24 UTC (permalink / raw)
  To: Stefan Kangas, João Távora
  Cc: monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

> >> "Because it's only appropriate for Common Lisp."  Good enough?
> >
> > No.  We don't know that.  We can't know that.
> 
> Yes we do, actually.  We know it won't work with any of the
> overwhelmingly most popular Lisps out there (Scheme, Clojure, Racket).

Which is totally different from saying that it's
only appropriate for Common Lisp.

If you want to say that it's inappropriate for
"the overwhelmingly most popular Lisps out there
(Scheme, Clojure, Racket)", then do so.

Saying it's only appropriate for Common Lisp is
something else.

> no particular effort has been made for the last
> 20 years to support anything but Common Lisp.

Not relevant.  Nothing says that some particular
effort would be needed to support another dialect.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25  9:02       ` João Távora
  2021-09-25 16:03         ` Drew Adams
@ 2021-09-27 14:48         ` Jean Louis
  1 sibling, 0 replies; 52+ messages in thread
From: Jean Louis @ 2021-09-27 14:48 UTC (permalink / raw)
  To: João Távora
  Cc: Stefan Kangas, monnier@iro.umontreal.ca, 49278@debbugs.gnu.org

* João Távora <joaotavora@gmail.com> [2021-09-25 12:05]:
> Drew Adams <drew.adams@oracle.com> writes:
> 
> > I would just say "some Lisps, such as Common Lisp".
> 
> Since lisp-mode doesn't work for any Lisp other than Common Lisp, that
> would be misleading.  People'll use it for their XYZ Lisp flavor, and
> it'll break.

I did not know it does not work. I could test `newlisp' and `pil' or
PicoLisp if I remember well under Lisp mode. Those are not Common
Lisp. 


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-25 16:03         ` Drew Adams
  2021-09-25 16:43           ` Stefan Kangas
@ 2021-09-27 20:10           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-27 22:05             ` Drew Adams
  1 sibling, 1 reply; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-27 20:10 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

>> "Because it's only appropriate for Common Lisp."  Good enough?
> No.  We don't know that.  We can't know that.

Whether it works for other modes is not important.  What we should
document is what it's intended to support.

People have used `c-mode` for many other languages than C over the
years, yet we haven't changed its documentation to say it for C-like
languages.

I don't understand why `lisp-mode` should be treated differently.


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 20:10           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-09-27 22:05             ` Drew Adams
  2021-09-27 22:25               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 52+ messages in thread
From: Drew Adams @ 2021-09-27 22:05 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

> >> "Because it's only appropriate for Common Lisp."  Good enough?
> > No.  We don't know that.  We can't know that.
> 
> Whether it works for other modes is not important.  What we should
> document is what it's intended to support.
> 
> People have used `c-mode` for many other languages than C over the
> years, yet we haven't changed its documentation to say it for C-like
> languages.
> 
> I don't understand why `lisp-mode` should be treated differently.

I don't see how what you're saying is different
from what I said, but I sense that you intend
it to mean something different.

I'm not asking that lisp-mode be changed to say
it's for Lisp-like languages.

Either it's only good for Common Lisp, and you
know that, or that's not the case.  If that's
the case then maybe it should be renamed to
common-lisp-mode or cl-mode, to avoid misleading.

If we don't know that to be the case then I'd
say ... leave it alone.

It's a Lisp mode.  (George: "Is there a rosy hue?"
Jerry: "There's...a...hue")

We know it kinda works for Common Lisp.  You
apparently know it kinda doesn't work for Scheme
or Clojure.

It sounds like the main question here is whether
to call it out as something only for Common Lisp,
in which its name should be changed, or to leave
as an ambiguous "Lisp" mode, and maybe point out
that at least it's kinda usable with Common Lisp
but there are this-and-that modes for dialects
Closure, Scheme,...





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 22:05             ` Drew Adams
@ 2021-09-27 22:25               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-27 23:24                 ` Drew Adams
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-27 22:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

>> >> "Because it's only appropriate for Common Lisp."  Good enough?
>> > No.  We don't know that.  We can't know that.
>> 
>> Whether it works for other modes is not important.  What we should
>> document is what it's intended to support.
>> 
>> People have used `c-mode` for many other languages than C over the
>> years, yet we haven't changed its documentation to say it for C-like
>> languages.
>> 
>> I don't understand why `lisp-mode` should be treated differently.
>
> I don't see how what you're saying is different
> from what I said, but I sense that you intend
> it to mean something different.

AFAIK you're arguing that we should not say "lisp-mode is designed for
Common-Lisp" on the basis that some users may be able to use for some
other languages, whereas I argue it doesn't matter what other languages
it may be used for unless we know and care about them to some extent.

If/when some other language pops up which we decide is important enough
(and similar enough) to support in `lisp-mode`, then we can revise the
doc, but for the last 20 years at least, `lisp-mode` has exclusively
catered to the needs of Common Lisp (even if some people have likely
used it for other languages, which I have no intention to prevent or
object to).

Other Lisps have their own major mode (Emacs Lisp, Scheme, Clojure,
Shen, ...).

> It's a Lisp mode.  (George: "Is there a rosy hue?"
> Jerry: "There's...a...hue")

No, that's the thing, it's a Common Lisp mode, not just "any Lisp" mode.

> We know it kinda works for Common Lisp.  You apparently know it kinda
> doesn't work for Scheme or Clojure.

I neither know nor care whether it does or not.  Just like we neither
know nor care whether `c-mode` works for other languages when we say
that `c-mode` is a major mode for C.

> It sounds like the main question here is whether
> to call it out as something only for Common Lisp,

Indeed, what else do you think we were discussing?

> in which its name should be changed,

Why should the name of the major mode be relevant to this discussion?


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 22:25               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-09-27 23:24                 ` Drew Adams
  2021-09-27 23:36                   ` João Távora
  2021-09-28  2:06                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 52+ messages in thread
From: Drew Adams @ 2021-09-27 23:24 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

> >> >> "Because it's only appropriate for Common Lisp."  Good enough?
> >> > No.  We don't know that.  We can't know that.
> >>
> >> Whether it works for other modes is not important.  What we should
> >> document is what it's intended to support.
> >>
> >> People have used `c-mode` for many other languages than C over the
> >> years, yet we haven't changed its documentation to say it for C-like
> >> languages.
> >>
> >> I don't understand why `lisp-mode` should be treated differently.
> >
> > I don't see how what you're saying is different
> > from what I said, but I sense that you intend
> > it to mean something different.
> 
> AFAIK you're arguing that we should not say "lisp-mode is designed for
> Common-Lisp"

No.  I was saying that I don't see why we should
say that "lisp-mode is only for Common Lisp".

> on the basis that some users may be able to use for some
> other languages, whereas I argue it doesn't matter what other languages
> it may be used for unless we know and care about them to some extent.

It matters, I think, if the mode is called "Lisp mode".

> > It's a Lisp mode.  (George: "Is there a
> > rosy hue?"  Jerry: "There's...a...hue")
> 
> No, that's the thing, it's a Common Lisp mode, not just "any Lisp" mode.

Then call it such, if you're sure it's useful
only for Common Lisp.

> Why should the name of the major mode be relevant to this discussion?

Why indeed.  `irrelevant-mode'? `mystery-mode'?
I'd like to call it `fortran-mode', but I guess
that's out.





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 23:24                 ` Drew Adams
@ 2021-09-27 23:36                   ` João Távora
  2021-09-28  2:17                     ` Drew Adams
  2021-09-28  2:06                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 52+ messages in thread
From: João Távora @ 2021-09-27 23:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, Stefan Monnier, 49278@debbugs.gnu.org

On Tue, Sep 28, 2021 at 12:25 AM Drew Adams <drew.adams@oracle.com> wrote:

> It matters, I think, if the mode is called "Lisp mode".

Yes, it's true.  The name is unfortunate.  There are many Lisps,
but "Lisp mode" is designed to work with only one of them, Common
Lisp.

Renaming the mode to clarify an option IMO.  Maybe, if it has no impacts.
_Then_ would you agree to "Common Lisp mode is for Common Lisp"?

Everybody that codes Common Lisp knows it by 'lisp-mode' and there
are many tools that use that name. Maybe we could make an alias?

Anyway, just _because_ it happens to be called Lisp Mode, erroneously,
doesn't make it suitable for more Lisps magically.  If I start calling you
Michael Jordan, and the name somehow sticks, I doubt you'll ever become
a professional basketball player as a result. Many people will make that
assumption and you'll have to clearly state that you're not (you're not,
right?) in your user's manual.

João





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 23:24                 ` Drew Adams
  2021-09-27 23:36                   ` João Távora
@ 2021-09-28  2:06                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-09-28  2:31                     ` Drew Adams
  1 sibling, 1 reply; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-28  2:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

> No.  I was saying that I don't see why we should
> say that "lisp-mode is only for Common Lisp".

AFAIK nobody has suggested to say "only Common Lisp".
The suggested text was:

    +  Lisp mode is the major mode for editing programs written in Common
    +Lisp or its ancestor dialects.  Its mode command is @kbd{M-x
    +lisp-mode}.  Emacs uses Lisp mode automatically for files whose names
    +end in @file{.l}, @file{.lsp}, or @file{.lisp}.

>> No, that's the thing, it's a Common Lisp mode, not just "any Lisp" mode.
> Then call it such, if you're sure it's useful
> only for Common Lisp.

Again, where does that "only" come from?  The thing I think we should
say clearly is that it's a major mode for Common Lisp.  The current
text:

    -  Lisp mode is the major mode for editing programs written in
    -general-purpose Lisp dialects, such as Common Lisp.  Its mode command

is just misleading since you'll probably be quite disappointed if you
try to use it with most other "general-purpose Lisp dialects" (such as
Clojure or Scheme).  Among the non-general purpose Lisp languages,
I think it can be tolerably for AutoCAD's Lisp (tho `emacs-lisp-mode`
would probably work about as well), but probably not for DSSSL (and even
less for XSLT, tho whether it'd still qualify as Lisp is not so clear).

>> Why should the name of the major mode be relevant to this discussion?
> Why indeed.  `irrelevant-mode'? `mystery-mode'?
> I'd like to call it `fortran-mode', but I guess
> that's out.

The major mode I use for ELisp is called `emacs-lisp-mode`, the major
mode I use for OCaml is `tuareg-mode`, the major mode I use for C is
`sm-c-mode`.  The most popular major mode for Perl is arguably
`cperl-mode`.  It's common for major modes's names to be related yet not
identical to the language they support.


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-27 23:36                   ` João Távora
@ 2021-09-28  2:17                     ` Drew Adams
  0 siblings, 0 replies; 52+ messages in thread
From: Drew Adams @ 2021-09-28  2:17 UTC (permalink / raw)
  To: João Távora
  Cc: Stefan Kangas, Stefan Monnier, 49278@debbugs.gnu.org

> > It matters, I think, if the mode is called "Lisp mode".
> 
> Yes, it's true.  The name is unfortunate.  There are many Lisps,
> but "Lisp mode" is designed to work with only one of them, Common
> Lisp.
> 
> Renaming the mode to clarify an option IMO.  Maybe, if it has no
> impacts.  _Then_ would you agree to "Common Lisp mode is for Common Lisp"?

Yes, but you really don't need my agreement on
any of this.  I wasn't even aware that lisp-mode
is only suitable for Common Lisp mode.  I think
you'll find that I never claimed that lisp-mode
is suitable for more than Common Lisp.  I asked
if folks were sure that it isn't.

The last time I used lisp-mode itself was probably
back in the 80s and 90s, when coding Common Lisp.

And lisp-mode was apparently always described
(perhaps inappropriately even from the beginning?)
as "for Lisps other than GNU Emacs Lisp".  I guess,
not having used it much recently, I just assumed
that description was apt at some level.

I don't really care how y'all resolve this.  I do
think that a misleading mode name is just about as
important as a misleading description - maybe more
so.  People see the mode name much more often than
they read a mode description.

A question that occurs to me, but I have no reason
to argue about it, is whether it would make sense
to move the specifically CL stuff from lisp-mode
to a cl-mode, which would inherit from a neutral
lisp-mode.  Perhaps that neutral code would serve
as ancestor also of the modes for Closure and
Scheme?  No idea whether any such factoring would
make sense.  Maybe there's so little in common
that a real (neutral) lisp-mode would make no sense.

Another question, in light of your endeavor: what
about lisp-interaction-mode?  Is that suitable for
more lisps than Elisp?  It has emacs-lisp-mode as
a parent, but it's called "lisp" interaction mode.
Is it suitable for Closure and Scheme?  If not,
should it too perhaps be renamed and redescribed?
(Part of its description is "Like Lisp mode
except...".)

Back in Emacs 20, lisp-interaction-mode was defined
in library lisp-mode.el, BTW.  Now it's defined in
elisp-mode.el.

(You might guess that I also don't use
lisp-interaction-mode.  I typically change the mode
of `*scratch*' to emacs-lisp-mode.)

> Everybody that codes Common Lisp knows it by 'lisp-mode' and there
> are many tools that use that name. Maybe we could make an alias?

There are various ways to rename.  A priori, I
don't care whether or how it's renamed.  I do
think that if lisp-mode is really common-lisp-mode,
and its name is throwing people off, then renaming
would make sense - other things being equal.  It's
those other things that might not all be so equal
that you'll likely want to weight.

Similarly, if lisp-interaction-mode is really
elisp-interaction-mode.  (I don't say that it is;
I don't know, and I don't care.)

> Anyway, just _because_ it happens to be called Lisp Mode, erroneously,
> doesn't make it suitable for more Lisps magically.

No, of course not.  Did something give you the
impression that I would think that?

 - Real Michael Jordan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-28  2:06                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-09-28  2:31                     ` Drew Adams
  2021-09-28  2:52                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 52+ messages in thread
From: Drew Adams @ 2021-09-28  2:31 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

> The current text:
> 
>     -  Lisp mode is the major mode for editing programs written in
>     -general-purpose Lisp dialects, such as Common Lisp.

In the Emacs versions I use (26.3) it's even worse.
The text you cite is relatively recent.  The text
for decades (26.3 on back to 20, at least):

  "Major mode for editing lisp code for Lisps
   other than GNU Emacs Lisp."

I'm guessing that was the original intention, but
yes, even in Emacs 20 there are some things that
are commonlispy.  (scheme.el is in Emacs 20, BTW.)

> is just misleading

Agreed.

> The major mode I use for ELisp is called `emacs-lisp-mode`, the major
> mode I use for OCaml is `tuareg-mode`, the major mode I use for C is
> `sm-c-mode`.  The most popular major mode for Perl is arguably
> `cperl-mode`.  It's common for major modes's names to be related yet
> not identical to the language they support.

OK, and?  I guess you're arguing to change the
description but not the name of lisp-mode.  Is
that it?





^ permalink raw reply	[flat|nested] 52+ messages in thread

* bug#49278: [External] : bug#49278: 28.0.50; Lisp Mode is for Common Lisp
  2021-09-28  2:31                     ` Drew Adams
@ 2021-09-28  2:52                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 52+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-28  2:52 UTC (permalink / raw)
  To: Drew Adams; +Cc: Stefan Kangas, João Távora, 49278@debbugs.gnu.org

>> is just misleading
> Agreed.

Great!

>> The major mode I use for ELisp is called `emacs-lisp-mode`, the major
>> mode I use for OCaml is `tuareg-mode`, the major mode I use for C is
>> `sm-c-mode`.  The most popular major mode for Perl is arguably
>> `cperl-mode`.  It's common for major modes's names to be related yet
>> not identical to the language they support.
> OK, and?  I guess you're arguing to change the
> description but not the name of lisp-mode.

I don't have an opinion formed on renaming the mode.
My point is just that it is orthogonal to the documentation of what the
mode does.


        Stefan






^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2021-09-28  2:52 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 18:06 bug#49278: 28.0.50; Lisp Mode is for Common Lisp João Távora
2021-06-29 18:16 ` Eli Zaretskii
2021-06-29 18:25   ` João Távora
2021-06-30 12:35     ` Eli Zaretskii
2021-06-30 12:45       ` João Távora
2021-06-29 20:46   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-29 20:55     ` João Távora
2021-06-29 22:59       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30 12:47         ` Eli Zaretskii
2021-06-30 12:37     ` Eli Zaretskii
2021-06-30 13:03       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30 13:21         ` João Távora
2021-06-30 13:29         ` Eli Zaretskii
2021-06-30 13:32           ` João Távora
2021-06-30 13:51             ` Eli Zaretskii
2021-06-30 14:32               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30 14:50                 ` João Távora
2021-06-30 15:54                   ` Eli Zaretskii
2021-06-30 16:02                     ` João Távora
2021-06-30 15:52                 ` Eli Zaretskii
2021-06-30 16:37                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30 16:47                     ` Eli Zaretskii
2021-06-30 16:50                       ` João Távora
2021-06-30 16:55                         ` Eli Zaretskii
2021-06-30 16:58                           ` João Távora
2021-06-30 14:54               ` João Távora
2021-06-30 15:55                 ` Eli Zaretskii
2021-06-30 15:58                   ` João Távora
2021-06-30 16:49                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30  3:50 ` Phil Hagelberg
2021-06-30  9:44   ` João Távora
2021-09-24 23:01 ` Stefan Kangas
2021-09-24 23:23   ` João Távora
2021-09-25  0:22     ` Stefan Kangas
2021-09-25  1:26       ` bug#49278: [External] : " Drew Adams
2021-09-25  1:35       ` Lars Ingebrigtsen
2021-09-25  6:42       ` Eli Zaretskii
2021-09-25  1:13     ` bug#49278: [External] : " Drew Adams
2021-09-25  9:02       ` João Távora
2021-09-25 16:03         ` Drew Adams
2021-09-25 16:43           ` Stefan Kangas
2021-09-25 17:24             ` Drew Adams
2021-09-27 20:10           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 22:05             ` Drew Adams
2021-09-27 22:25               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 23:24                 ` Drew Adams
2021-09-27 23:36                   ` João Távora
2021-09-28  2:17                     ` Drew Adams
2021-09-28  2:06                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-28  2:31                     ` Drew Adams
2021-09-28  2:52                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-27 14:48         ` Jean Louis

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).