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#50674: Major mode for etc/AUTHORS with basic font-locking Date: Sun, 19 Sep 2021 10:38:32 -0700 Message-ID: References: <87o88oikye.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30171"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50674@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 19 19:39:21 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 1mS0mf-0007fh-3f for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 19:39:21 +0200 Original-Received: from localhost ([::1]:49704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS0md-0001fQ-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 13:39:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS0mN-0001di-KK for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 13:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS0mM-0005DF-4v for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 13:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mS0mM-0002TX-2Y for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 13:39: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: Sun, 19 Sep 2021 17:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50674 X-GNU-PR-Package: emacs Original-Received: via spool by 50674-submit@debbugs.gnu.org id=B50674.16320731209446 (code B ref 50674); Sun, 19 Sep 2021 17:39:02 +0000 Original-Received: (at 50674) by debbugs.gnu.org; 19 Sep 2021 17:38:40 +0000 Original-Received: from localhost ([127.0.0.1]:39845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS0m0-0002SI-Lb for submit@debbugs.gnu.org; Sun, 19 Sep 2021 13:38:40 -0400 Original-Received: from mail-pl1-f180.google.com ([209.85.214.180]:37751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS0ly-0002S3-Fl for 50674@debbugs.gnu.org; Sun, 19 Sep 2021 13:38:39 -0400 Original-Received: by mail-pl1-f180.google.com with SMTP id j14so2401472plx.4 for <50674@debbugs.gnu.org>; Sun, 19 Sep 2021 10:38:38 -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:mime-version:date :message-id:subject:to:cc; bh=idYlmvDnTLlxVO+y+LVAEIby8SexkP8gfTIqP3goduw=; b=eR5G8bSRCiRgUik1JPrPVYIwet1KcjFjnii/gM8CaEluuNw3Bz4+I0U+2l6zqCtZTL CMFeQw2OkVE2HKkXI5TztEsBw6eu6ucmUW4ec+8I7W+WQHcB4zlLDo66gOS9YDhbY0X/ fl5Ku7MxxiKd1r9faT8u3VYUuCxQdLAyAtpS3xqQFAaHJflHPFbpjDReQWiU49UZyWdK bK96kreQWHlf2TWeoCl39SyO/JkGrHqwU1P41qZ3aZF2SR7saNOZNaKme/XLSEpD7uCi DkgtB7ar6NQ0qLNvH6jhU0/CKsyifeD4IPdMGSlNQzXd1cwuSor1XqvFObwM4yXGfkaU vFRQ== X-Gm-Message-State: AOAM530txAx1gK6SG7QDYxB9Q/jtqSoTTSnVtilhjTUOkuSny8kcBO1S 7pYXl3gf3IPLAv/fXM4L3sPj5Kdmmyt+TRct5Sg= X-Google-Smtp-Source: ABdhPJy6uKUIEfSy1q4vXi7aeR1zFXc+DuOD49rlMtod5WCuyphaB0iDE+eEuvSeFzhhZ0x/FWSqrc5mZxEUCdONvmM= X-Received: by 2002:a17:902:d505:b0:13d:b037:2087 with SMTP id b5-20020a170902d50500b0013db0372087mr1044896plg.22.1632073112487; Sun, 19 Sep 2021 10:38:32 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 19 Sep 2021 10:38:32 -0700 In-Reply-To: <87o88oikye.fsf@mail.linkov.net> 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:214774 Archived-At: Juri Linkov writes: >> +;;;###autoload >> +(define-derived-mode etc-authors-mode special-mode "Authors View" >> + "Major mode for viewing \"etc/AUTHORS\" from the Emacs distribution. >> +Provides some basic font locking and not much else." >> + (setq-local font-lock-defaults >> + '(etc-authors-mode-font-lock-keywords nil nil ((?_ . "w")))) >> + (setq font-lock-multiline nil) >> + (etc-authors-mode--hide-local-variables)) > > Isn't generic-x.el a more suitable place for such small modes? The problem I see is that this does not use `define-generic-mode', unlike the other modes in there, and also I'm not sure it makes sense to drop autoloaded functions in there. AFAIU, that file and its modes is supposed to be optional (not that I agree that they should be).