GNU bug report logs - #49278
28.0.50; Lisp Mode is for Common Lisp

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Tue, 29 Jun 2021 18:07:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Phil Hagelberg <phil <at> hagelb.org>
Cc: 49278 <at> debbugs.gnu.org
Subject: bug#49278: 28.0.50; Lisp Mode is for Common Lisp
Date: Wed, 30 Jun 2021 10:44:22 +0100
On Wed, Jun 30, 2021 at 4:51 AM Phil Hagelberg <phil <at> 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




This bug report was last modified 3 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.