From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#49278: 28.0.50; Lisp Mode is for Common Lisp Date: Wed, 30 Jun 2021 13:45:58 +0100 Message-ID: References: <87y2asa6lg.fsf@gmail.com> <835yxwo7td.fsf@gnu.org> <83v95vmsxy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 49278@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 30 14:47:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyZcg-0002nR-Gy for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Jun 2021 14:47:22 +0200 Original-Received: from localhost ([::1]:52230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyZce-0008Sw-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Jun 2021 08:47:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyZcO-0008Sb-CR for bug-gnu-emacs@gnu.org; Wed, 30 Jun 2021 08:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyZcN-0001qj-15 for bug-gnu-emacs@gnu.org; Wed, 30 Jun 2021 08:47:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyZcM-0000ZG-W2 for bug-gnu-emacs@gnu.org; Wed, 30 Jun 2021 08:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 12:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49278 X-GNU-PR-Package: emacs Original-Received: via spool by 49278-submit@debbugs.gnu.org id=B49278.16250571782092 (code B ref 49278); Wed, 30 Jun 2021 12:47:02 +0000 Original-Received: (at 49278) by debbugs.gnu.org; 30 Jun 2021 12:46:18 +0000 Original-Received: from localhost ([127.0.0.1]:56701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZbd-0000Xg-Jf for submit@debbugs.gnu.org; Wed, 30 Jun 2021 08:46:18 -0400 Original-Received: from mail-pg1-f182.google.com ([209.85.215.182]:35664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyZbb-0000XP-Ra for 49278@debbugs.gnu.org; Wed, 30 Jun 2021 08:46:16 -0400 Original-Received: by mail-pg1-f182.google.com with SMTP id v7so2162037pgl.2 for <49278@debbugs.gnu.org>; Wed, 30 Jun 2021 05:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=X4M/RrZ3pASQ7COzTgAy98Iy5+n1YCDz0JX0w0rc5w8=; b=nJHnAEC32eRXoTbMNl1t4JtBdkQ0VC0941Ft0+h9655Y/sclJBUCbK9UNVoBChqUV3 PiMiFfhVorElANMCVq+pyZPNbw4qhUbZl/VX5gEj/S54TigTRQJQ0XGdLnWTewTA1vR3 D8Dx4qKH9HVtbqYcndhOuJJPaFAJwi1esUie+xMaWa0WNpwl7cx07+7teasuUIz5pSIk VGZ72eOjMNxqxg8BKj0HcCXWdipXdl2D6D+QYF0a8q4bBgwBY+XjfhlWX4uSRgB1QQ4L LDL9f4rNiJxNyhXDqF5hE282YKl3T3tnxownyVZ+DnVf4dgmLa0jF8J5eUMJOgoU2Zre Kpdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=X4M/RrZ3pASQ7COzTgAy98Iy5+n1YCDz0JX0w0rc5w8=; b=ZPbJU1h6I2Cg9tf9jJP+v2DOriT74rTeVmZgc1Ar3Pqhh0Cp9B6x3xN3evlt0y7J3a 9xaNCztHRqCF00WIGoeWyZ+wWLTVv91yDVcmLvf1kdDSovhUmiC97Atikiqaq+oKFuQZ tMpLidaKkC2yS/0zvhRvcqIDfSZsXb2vWWF/wI7wu5MLmcwoSHLWdjm+8w4PByXdka64 C1X4PNJjpO2RHDxoDU5D9gwj3dMI1yVQWtBh5C7xRDDaIf5IGGlods5FPDkY8ntFYsxh rs/fl63LJ63r8bjSIbpvMB+49rZP10Ct8N4bcx6oasSmKitLbYI03wekMOVJ3jE/Ga5/ lZnA== X-Gm-Message-State: AOAM532J8zynozphZZidyPPH9tUCqSsFJm6J8BMFgtmm0mAO2sHDCdl2 hoGTgP1TyiwiJLhVyWwAM5OJiiuMy7p5dcNygI4= X-Google-Smtp-Source: ABdhPJyuWsKqW2LvnRYnNtFyjhZNzFNXgt77uxKQPAaUwlaaLLSaYKIv0W9ysJvlLbpKC61mqZxN/6UxqTwgytmuRZQ= X-Received: by 2002:a65:63d2:: with SMTP id n18mr33822321pgv.447.1625057169917; Wed, 30 Jun 2021 05:46:09 -0700 (PDT) In-Reply-To: <83v95vmsxy.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209165 Archived-At: On Wed, Jun 30, 2021 at 1:35 PM Eli Zaretskii wrote: > > > From: Jo=C3=A3o T=C3=A1vora > > Date: Tue, 29 Jun 2021 19:25:45 +0100 > > Cc: 49278@debbugs.gnu.org, Stefan Monnier > > > > > > - Lisp mode is the major mode for editing programs written in > > > > -general-purpose Lisp dialects, such as Common Lisp. Its mode comm= and > > > > -is @kbd{M-x lisp-mode}. Emacs uses Lisp mode automatically for fi= les > > > > -whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}. > > > > + Lisp mode is the major mode for editing programs written in Comm= on > > > > +Lisp or its ancestor dialects. Its mode command is @kbd{M-x > > > > +lisp-mode}. Emacs uses Lisp mode automatically for files whose na= mes > > > > +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=C3=A3o