From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50801: 28.0.50; Emacs manual about file variables doesn't mention that major modes shouldn't end in "-mode" Date: Sat, 25 Sep 2021 20:22:28 +0200 Message-ID: References: Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="674"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cc: 50801@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 25 20:23:18 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 1mUCKS-000AWb-As for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 20:23:16 +0200 Original-Received: from localhost ([::1]:48194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUCKR-00011f-BA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 14:23:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUCKE-00011I-RK for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 14:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51379) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUCKE-0007AO-Jm for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 14:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUCKE-0000AA-Gj for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 14:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50801 X-GNU-PR-Package: emacs Original-Received: via spool by 50801-submit@debbugs.gnu.org id=B50801.1632594163580 (code B ref 50801); Sat, 25 Sep 2021 18:23:02 +0000 Original-Received: (at 50801) by debbugs.gnu.org; 25 Sep 2021 18:22:43 +0000 Original-Received: from localhost ([127.0.0.1]:34690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUCJv-00009H-1T for submit@debbugs.gnu.org; Sat, 25 Sep 2021 14:22:43 -0400 Original-Received: from sonic312-26.consmr.mail.ir2.yahoo.com ([77.238.178.97]:44549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUCJr-000092-Hq for 50801@debbugs.gnu.org; Sat, 25 Sep 2021 14:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1632594153; bh=igJGnaMLiH5C43YdomaZvMhKhL0ElPfKxaF2O7l5Owc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=sWsS81UamQfq1XOjR5cE+h4O+lQgQOvWvIn/GzimqBmcwp82ND7heOtJV1i7OaNGsj+M3ZCWnGv6AMPXC+4KxOnwq9OoJGYRs1sNABgO5owsflHX70EziXPB0i9G0r+QfOWIsg89lD50P18TUms9X67nvsqJ9egW7rwPl2IDKL5p7I1f9OMAGYn6mdPJvtdI6Gd37gCVjQxWLj1VJqGNz07a8ePVOWntsvWExQ6VDPNX/OYPmo7yB9Ebp93IhJnRPtZcDgXh339cnBbIQwIQy2kL12xZ8Tebz0xdgoq754033nMQlbbd4FYe1FaDceUAeoANLXH8intPoLGJQn4aDw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1632594153; bh=HchMVK2NWEZxBW75SiAByJ2E8O8aA2ZkvhvPdZdZd8l=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=DuzJKUQEjezDQTmgnhw2iOuihBratThVOsvrYwaDRF3U7wABTUtI9jVcXppysYrLBwsyhrLkn34rlpwUV8rH8MMEzEepu7H0aD8vh1oC7v6om0EazEbk2FVaFJUOfopB5gNV6ys7l0zZtxFH85g2yTGJwqcC9uovapMw+SjgOxheRwu6dpSCYL/bI3XiAX1uXviJJmstx+2eFfGOilF6B6RtdInb/3Nqf3rTIXGHhsjoibEzmI4g9Kg7XE9DroVbbfUkfSZqJAGxhk60xPi+ApJvPQgTM1yItxsiyJnPM44pjMSoKV+IzhBTwubTdBO+kSy5c+2sAfTguVyVFzjomA== X-YMail-OSG: kPhJx.kVM1kIqZRxhg86Z_Qz2NM5bhMDwS4OnU1hSvnqoM9k6E0jPwqEE.ks36c 7f9mw8b0Fncd8QX9ckNGAx0mLr5ioXcEAczUq7.jRk1W4koH1vhcAB4QhzKY4frX8fCYFYW7PJtM vR72pgTUlfQ7_iNBnbsv4hjH_IKdJbOT7bfjmQw8eyyi3gP6BWJl.jVBYKhm91Nrk.i4D2bs6Zwg nDG5dkuUhIBqkHYaiFIBFTcgZTdelb42it204LZlztb3ctT9Rb13vNWHV4QeReHmdnJhTwjok1.T 5kla5vXDDyuwyhw9Vk9O3eCHNTx5fD4ZYzxXBg8AKAqsH1P9ZwvZ4kCvZYPfSJbXl2E7oRC.Mr7N 5P5NUGNsi_RFMF_Zrajb60lZd4LlY8fE.qn1uKTppIZ_XIi.uHWw5hZcv4Uco.b3SUINUQ2Z1qg1 sWcDCWID7DuMYfRTIeQsu0VLzFn3ZmHVbfqTdmye9wo3M_bFgB4LtxTOS02f52NBHJnePUAbvS5i qTyEoPjEBvb8hyqrl8JlT9qDxTYLvMSoAOgSEwlFO6I1NZ_x4XCwz_LgNV.aVQ5W_3rAZdTLrETC wWZ3eYtKUJIRq8CCPT5U4W473VLBgTbn0_gZKFMMq4Fa8QmcKAbbmXQV.vP62sN7ExHWr9FyIyaT U8iNgJFWRlbaVte.uCzPxCdwQBIvLJTO6hwcSw4f_6edc2wZ5tN6kJahw7g1EHBJGrNUn7mH83Dj VlfS5Lswl_AsJgTICRPSJnSfL5OR.ilbvgJ0SbRa2OA7FG9FUEDxXxmaLyV29yZj0hvpPlKrO9GV e9WQzc4uAqiy0ScRKLHC0WBYNyA6JeObKWdK0BGAug X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Sat, 25 Sep 2021 18:22:33 +0000 Original-Received: by kubenode529.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0fc5f190f53e3abe3567e293bc2d3608; Sat, 25 Sep 2021 18:22:29 +0000 (UTC) In-Reply-To: (Stefan Kangas's message of "Sat, 25 Sep 2021 10:46:12 -0700") X-Mailer: WebService/1.1.19043 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:215496 Archived-At: Stefan Kangas writes: > >> I'm reviewing the manuals for the upcoming Emacs 28 and I have a couple >> of minor suggestions for node "49.2.4.1 Specifying File Variables": > > That is extremely useful, thank you very much for working on this. > > (BTW, you can press `w' in info to get a reference like "(emacs) > Specifying File Variables". This is not super important, but a handy > feature to know about, as you can then `M-: (info "...")' and get to > that section quickly.) Yep, I forgot to add a direct link to the Info node, sorry. BTW you can 'C-u w' to get the link inside a function call to `info` directly. > >> The node doesn't explictly mention the crucial information that in >> 'mode: MODENAME' 'MODENAME' must not end in "-mode". It's true that >> there's an example down there that says "mode: Lisp", so users may infer >> that you don't need to spell the major mode with "-mode", but I thought >> it may be better to be explicit about in the manual. > > Fully agreed. Perhaps something like this? > > diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi > index d12033f841..d5f18fff35 100644 > --- a/doc/emacs/custom.texi > +++ b/doc/emacs/custom.texi > @@ -1084,8 +1084,9 @@ Specifying File Variables > @noindent > You can specify any number of variable/value pairs in this way, each > pair with a colon and semicolon. The special variable/value pair > -@code{mode: @var{modename};}, if present, specifies a major mode. The > -@var{value}s are used literally, and not evaluated. > +@code{mode: @var{modename};}, if present, specifies a major mode > +(excluding the ``-mode'' part). The @var{value}s are used literally, > +and not evaluated. I'm not a native speaker but it reads well to me, thank you. > > @findex add-file-local-variable-prop-line > @findex delete-file-local-variable-prop-line > >> Another suggestion I have is that the manual doesn't mention that >> something like "-*- C++ -*-" (that is, omitting the "mode" keyword) is >> also supported. Many free software projects have traditionally been >> using "-* C++ -*" in their C++ header files to make Emacs distinguish >> them from plain C files. See also src/epaths.in in the Emacs >> repository, among others. I see this used by Jim Blandy since 1992 at >> least, but I don't really know if a) it's really a stable way to declare >> a file-local mode, and we may lack the historical info to answer that, >> and b) it's worth mentioning it in the manual. > > I can't remember the details, but I believe that this form is considered > obsolete and/or problematic. So I think it's fine to not document it. Makes sense.