From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: Customisation for Comments Date: Fri, 11 Feb 2022 17:26:05 +0000 Message-ID: References: Reply-To: goncholden 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="32056"; mail-complaints-to="usenet@ciao.gmane.io" Cc: goncholden via Users list for the GNU Emacs text editor To: fatiparty@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 11 18:26:48 2022 Return-path: Envelope-to: geh-help-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 1nIZh0-00084A-Km for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 11 Feb 2022 18:26:46 +0100 Original-Received: from localhost ([::1]:46072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIZgz-0004E0-8V for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 11 Feb 2022 12:26:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIZgV-0004Dp-M9 for help-gnu-emacs@gnu.org; Fri, 11 Feb 2022 12:26:15 -0500 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]:40154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIZgQ-0001Yh-Tz for help-gnu-emacs@gnu.org; Fri, 11 Feb 2022 12:26:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1644600366; bh=CBjBQnSMCq8TDnrmMFZrTHB+OcmQGzW1cwHyImV6N70=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=t0QYep3jSvkFzKKLy3jygGu0xK/MmfMNue0/OSxsZISaEHw1d8cXjEJziXP7phUZD OGgUFD+vu1LNDfK3U0ZjQVxtRlMcXvR7jLFRMQ+7ijt0CZHBi4NOIZS60ojAI0os6T YkZlrAkWy0t3234bEdnhqExgwShtUOE4yy78tgCKAY27tSp03+Kfh8/FXHxH/EvEo3 QVpI7BgLkH0La3mNsdHTx0KHOmcNRj+Vp0TSgh0KI24t8+0yeqM8A0/qLgxYReSedf 6i/mmBzmSMWf9uLDB3hReYZ78Gm/RfGhu741JERGDneak460xmvdvNi2lXiQ2mR1Yt 1VZFW2wYQo73g== In-Reply-To: Received-SPF: pass client-ip=185.70.40.138; envelope-from=goncholden@protonmail.com; helo=mail-40138.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135894 Archived-At: ------- Original Message ------- On Thursday, February 10th, 2022 at 11:37 PM, fatiparty--- via Users list f= or the GNU Emacs text editor wrote: > Feb 10, 2022, 10:59 by help-gnu-emacs@gnu.org: > > > Am using modus-vivendi theme to which I add a bold font for everything. > > > > I want a special customisation for comments, using normal weight, and h= aving a keybinding that changes the > > > > contrast ratio between the comment colour and the background. > > > > Had started writing a minor mode, but this seems to be a non-standard i= mplementation. What would be the > > > > appropriate way to customise comments as described. Any examples I can = use? > > In the elisp manual you can find how the recommended way is to derive a m= ode from anexisting one using define-derived-mode. If there is no closelyre= lated mode, you should inherit from either text-mode,special-mode, or prog-= mode. Ifnone of these are suitable, you can inherit from fundamental-mode. > > Although I have not done this myself, and so unaware of the details. Have had a look at that. But I need some examples if I am going to have a = successful implementation. There is not much information except for listings of funct= ions. Would be most helpful to have a section about implementing derived-modes an= d minor-modes.