From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: font-lock as a single command Date: Sat, 13 Feb 2021 01:04:57 +0100 Message-ID: References: <87lfbsdf7i.fsf@zoho.eu> 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="7986"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: moasenwood@zoho.eu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 01:05:51 2021 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 1lAiRZ-0001sQ-KA for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 01:05:49 +0100 Original-Received: from localhost ([::1]:37666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAiRY-0002Xs-KA for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 19:05:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAiQo-0002WH-NY for help-gnu-emacs@gnu.org; Fri, 12 Feb 2021 19:05:02 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:59935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAiQm-0007hC-FQ for help-gnu-emacs@gnu.org; Fri, 12 Feb 2021 19:05:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613174698; bh=aO0fJsg3qhpgHptMOg+Gp+CyFMoRmdCT13Jmu0v9XTM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=J2Vt7OjDgkXIAnpyNm8UZKOp0/RT4I46MHsiGpxmgUt4ByG2lZwSt/hQa+bB9RRMr 2FnSV2NoVJ5fT9Xf0/I1NooBt4f/2dCqAos4rH0c+a5bu7Il9elYqye+VemhqL/f4T jF4L7qPxGBLBYFPWXariczd6onybRyDXKddIs8TY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs05.server.lan [172.19.170.173]) (via HTTP); Sat, 13 Feb 2021 01:04:57 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87lfbsdf7i.fsf@zoho.eu> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:3SnAlUvEnY1gTOqxfmmPnBSuCUbjNZUR5GLo/KJJVjVE34vMdVVRCFx+x3RvOf0WJHwcn UNby2dEdD9/B7TmOXV9SQPbxcHQYwxBcrOw1bf71ySqjMew2KAKlmdG4dt+7loFt3wX9la1eP7AA 0zLjj958Esi9+eI479/8m/R8VXNwHhTYTSbNUk0ZhLwz3hozHJPpGf9GhAGIINM690jXpNrgZXpq TvjeH8dQLJHEvtgqGkDUqnHs02hFpRLR2AnXwu0/EzUHhtZsi0KO2NJBdW7DiGS77hJXEVOvMVDm QM= X-UI-Out-Filterresults: notjunk:1;V03:K0:1UukjL+pUtE=:6KkIlCR+8ymG8nt7RxtQrf yr2JnyhbRpjSjHhVWckx0dn2XvMhNv65MA/MGy+GY42lmKlQeS++sfBKRC49+Jl5BHTjl8xhz lR/CoX5S542R7+qtkYhXlztoJg2UW7VHelFSvQA3oHVm+LbWW5pJW5EHaXLBu9bIP3VoZB0iY TQaOzWb4O7brjKmHLRFtG8iumIs4E13j4hLCHr4gcqwGjuQKeM2f8+xZasCbDchd6fyCCe2jv rphlk8AVfClKcRmdnSN8/ZVZIX3qNtBf0q2OhCdvUlmWzfP930F0fvqhkL1TuuiEl9mKiM4Ix jrHeqwrf3QC1LSiECrDzdQH6BrZmOMs7vWqaP/lJTNlLIVL2WEct/21M8y4Md0Cf/8i9Xqubx 6NhWD6/GZ0j2R5jBEMGIVcmfE48Y18/feYWok8QyaOSGSlM79HRhhvZEpf1tmQmrsLHMuTzLT GUYnujhtXzua5Y0h195ncIkasu4haQJBQHTT9fCfMvonfWCSUdjMAAyS7UvroSXzceeM/ciF4 aIhUCF57aO6gMrvt9+tWqYdxJyqQHbjNQ/dGOrKAmo0+xWS+QkYq4uLSdat8lhsEaWfoZRjxl Kxk4oqeoLYOa4= Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:127877 Archived-At: (font-lock-add-keywords MODE KEYWORDS &optional HOW) What does the optional HOW actually do? Regards Christopher > Sent: Saturday, February 13, 2021 at 11:44 AM > From: "Emanuel Berg via Users list for the GNU Emacs text editor" > To: help-gnu-emacs@gnu.org > Subject: Re: font-lock as a single command > > Christopher Dimech wrote: > > > I want to construct the font-lock as a single command > > > > (font-lock-add-keywords nil ...) > > > > But I am unsure how to do it. > > I believe you :) > > > (defconst supinf-font-lock-cruc > > (append > > '((supinf-match > > (1 (supinf-raise-cruc (match-beginning 0))) ))) > > "Experimental expressions to highlight in TeX modes.") > > ? > > Here is how to add a single word to Elisp mode: > > (font-lock-add-keywords 'emacs-lisp-mode > '( > ("lamersRus" . font-lock-builtin-face) > ) > t) > > > (defun supinf-enable () > > "Enables a typeface for displaying tex commands." > > (setq supinf-signal t) > > (font-lock-add-keywords nil supinf-font-lock-cruc t)) > > M-x font-lock-mode RET > > or (font-lock-mode 'toggle) > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > >