From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas 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 10:46:12 -0700 Message-ID: References: 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="3164"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 50801@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 25 20:06:11 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 1mUC3u-0000Wq-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 20:06:10 +0200 Original-Received: from localhost ([::1]:58442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUC3t-0004z1-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 14:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUBlO-0000yg-Km for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 13:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUBlO-0001iX-Da for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 13:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUBlO-0007dY-Bf for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2021 13:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2021 17:47: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.163259198129290 (code B ref 50801); Sat, 25 Sep 2021 17:47:02 +0000 Original-Received: (at 50801) by debbugs.gnu.org; 25 Sep 2021 17:46:21 +0000 Original-Received: from localhost ([127.0.0.1]:34632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUBki-0007cM-T9 for submit@debbugs.gnu.org; Sat, 25 Sep 2021 13:46:21 -0400 Original-Received: from mail-pl1-f176.google.com ([209.85.214.176]:34678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUBkg-0007c7-NO for 50801@debbugs.gnu.org; Sat, 25 Sep 2021 13:46:19 -0400 Original-Received: by mail-pl1-f176.google.com with SMTP id a7so8777956plm.1 for <50801@debbugs.gnu.org>; Sat, 25 Sep 2021 10:46:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=M8nNDqymnfvYIqk4zK0pyIGxSwY40uKKNGc4IfLxp5M=; b=suTGpFTyxUQWYUhuLg9kpp9mruXKTW9QHr9c/62iV7YRU+9QthEDLACWJaX9R4MWlL CsCgPSFCRMuFWQ+F04ICNAmilnyPqTWG0wVOEuuF8seXVLAMsLTZqtPOqVCC621HA8To ObgAyMfQ1+2CdgTA9ynND8O3aeDer875GnuEngkioL6CVm87TPmDSB6toMVNfJz+aC1n ko8UmZeuN/g+r1OVO6JnWwBDLhnMfYEYjYYb8yjarMzKMv93NmBPQ/ALETphkLhACPrN VdwbD3bvIQE9lQNYNCI2TuI/Aqsy8dnuVVFmaObArdKX/dazFdQ4Kf+H2vEsm0T9YIBF UTjg== X-Gm-Message-State: AOAM531MGR1LUcU24VRikwP0uWncd6LpLm88IpTv9wbb5ZnrCy4D3SAl YP99Cjjx51P/F+J/EMCLMFWB32sQkW8bdyBo3+g= X-Google-Smtp-Source: ABdhPJyJRDlO6y7Ut414PuBkSXqf72BoYpRhgqhNF/KxBeXFTgZD8Uf9HGTaJ0n5DqEzA66ZlxQhxwMXC3W+l8W4lWs= X-Received: by 2002:a17:90b:3805:: with SMTP id mq5mr9400092pjb.143.1632591972701; Sat, 25 Sep 2021 10:46:12 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 25 Sep 2021 10:46:12 -0700 In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Sat, 25 Sep 2021 15:39:45 +0200") 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:215489 Archived-At: Daniel Mart=C3=ADn 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.) > 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. @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.