From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#27881: New major mode: Less mode Date: Mon, 31 Jul 2017 08:44:24 -0400 Message-ID: References: <1501437183.13205.0@smtp.gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1501505129 4283 195.159.176.226 (31 Jul 2017 12:45:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2017 12:45:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: tom@tromey.com, dgutov@yandex.ru, 27881@debbugs.gnu.org, simenheg@gmail.com To: Steve Purcell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 31 14:45:23 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcA4P-0000JL-Am for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Jul 2017 14:45:14 +0200 Original-Received: from localhost ([::1]:59373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcA4V-00039g-35 for geb-bug-gnu-emacs@m.gmane.org; Mon, 31 Jul 2017 08:45:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcA4J-00034f-Lb for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcA4E-0002uA-N5 for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcA4E-0002te-J2 for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcA4E-0000ty-9T for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Jul 2017 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27881 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, Tom Tromey , Simen =?UTF-8?Q?Heggest=C3=B8yl?= , Dmitry Gutov Original-Received: via spool by submit@debbugs.gnu.org id=B.15015050813423 (code B ref -1); Mon, 31 Jul 2017 12:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Jul 2017 12:44:41 +0000 Original-Received: from localhost ([127.0.0.1]:34874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcA3t-0000t8-ED for submit@debbugs.gnu.org; Mon, 31 Jul 2017 08:44:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcA3r-0000sw-4m for submit@debbugs.gnu.org; Mon, 31 Jul 2017 08:44:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcA3k-0002fv-L6 for submit@debbugs.gnu.org; Mon, 31 Jul 2017 08:44:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcA3k-0002fr-Hr for submit@debbugs.gnu.org; Mon, 31 Jul 2017 08:44:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcA3j-00032w-GD for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:44:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcA3e-0002c3-HF for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:44:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64861) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcA3e-0002aj-9y for bug-gnu-emacs@gnu.org; Mon, 31 Jul 2017 08:44:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DCBABmJX9Z/+jlr2xdGwEBAQMBAQEJAQEBg1qQeI8EgWstAZdvhUEEAgKDfEQUAQIBAQEBAQEBayiFGQEEASMzIwULCxoCGA4CAhQYDSSKOgiteYImizoBAQgogQuCHYUugyeEdIMTgmEFkGuPBJ9JhxuULoFENiGBCjIhCDGHfiSKZQEBAQ X-IPAS-Result: A0DCBABmJX9Z/+jlr2xdGwEBAQMBAQEJAQEBg1qQeI8EgWstAZdvhUEEAgKDfEQUAQIBAQEBAQEBayiFGQEEASMzIwULCxoCGA4CAhQYDSSKOgiteYImizoBAQgogQuCHYUugyeEdIMTgmEFkGuPBJ9JhxuULoFENiGBCjIhCDGHfiSKZQEBAQ X-IronPort-AV: E=Sophos;i="5.40,442,1496116800"; d="scan'208";a="323346404" Original-Received: from 108-175-229-232.dsl.teksavvy.com (HELO pastel.home) ([108.175.229.232]) by smtp.teksavvy.com with ESMTP; 31 Jul 2017 08:44:24 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 62A8D62B41; Mon, 31 Jul 2017 08:44:24 -0400 (EDT) In-Reply-To: (Steve Purcell's message of "Mon, 31 Jul 2017 18:39:23 +1200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135194 Archived-At: >>> ;;;###autoload >>> -(defcustom less-css-lessc-command "lessc" >> Why autoload all these defcustom. Sounds like a bug. > It may well be superfluous, but I found a note that this was added because > non-autoloaded custom vars wouldn=E2=80=99t be considered safe as dir loc= al > variables otherwise. The safety info may need to be autoloaded, indeed (IIUC we have a misfeature in there: we should enable the major mode (when possible) before checking safety of the local vars). But the vars themselves are better not autoloaded. > However, I wouldn=E2=80=99t advocate adding arbitrary flags to a command = like this, > because it can=E2=80=99t then be passed to one of the =E2=80=9Cprocess=E2= =80=9D functions that > expects the first of its args to be the path of the executable, right? Indeed, if you don't quote it there, it means it's a "shell" string and can hence only make sense when passed to a shell, rather than used directly as a file name. >> The standard way is to do: >> >> (defvar less-mode-map >> (let ((map (make-sparse-keymap)))) >> (define-key map "\C-c\C-c" 'less-compile) >> map) >> >> before the `define-derived-mode=E2=80=99. > Is there an advantage to this? Mostly consistency (each style has its quirks). Stefan