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: tex keywords and positioning Date: Mon, 8 Feb 2021 19:24:02 +0100 Message-ID: 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="11919"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 09 00:22:09 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 1l9Fr6-00031R-Rm for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 00:22:08 +0100 Original-Received: from localhost ([::1]:49976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Fr5-0005hv-Rp for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 18:22:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9BCk-0003fN-EA for help-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:10 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:54785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9BCe-0006Hr-5I for help-gnu-emacs@gnu.org; Mon, 08 Feb 2021 13:24:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612808642; bh=l8V5Y8tuAfhTi6a0XduTxcvogObeiHKu5fmL92yUcF0=; h=X-UI-Sender-Class:From:To:Subject:Date; b=D0DU2Us3ofplcOcz/LymwrF6Od+KZQxMsBGLls2oe8Sa7ZEgoV4YtaRR6qIdMJwmM UeFWd5JdRmmBdSm4OGR2caUQu3dGkjGQi3N9tml5c8x9Z/8dqULKQ353yJ3fZ4qJFt ogJ6pp/GTJMNS2jVma9Iag/2DdMCF1u4FIGga/Zk= 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-bs12.server.lan [172.19.170.180]) (via HTTP); Mon, 8 Feb 2021 19:24:02 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:sFiuQyH5JeWWVaWLbWe0/I12c6We1OcaVx/1MLaF0yU1hpiILgvIyopfqn6rwFuj4sPz3 6B6dNO9nTetIV6InGQxs67yjEWXKCrphF8xrQrdOypTYt04onB6v903bb/Nz7/HmVd8LZ7sPwUuG bAuMw3nbg5wzcncHvnRdyV9h2khFIb3nlrEzP9sKFRO/Jsy+BzCfd19qLDLcT4g2TdcarPdaQ08h 2thxSHMKNr4KZMVyambzCmIHm7ZX9JNpSmFZU7Sfl8iZut/eExTsuxNmQCNKWdNh1KpQ/tHt5+Gh oA= X-UI-Out-Filterresults: notjunk:1;V03:K0:RduRvXuktWA=:fa3rAdSbDqI02MwNZeSCEb vSTawCwM+jON+dmHgRXiXZastwJXHu7Rm/4RohxFMsgWpzF4fXS/InDgE9g9t+I8NbJ3gKgU4 oL1vCl6PXu/94QXRHkaNXNSwOtu8lwRoRUIAUn2dNeLmWiHJB1LO+u8eprkypWh9OSdRc7BO9 soYfJXxXIKD1LoNNQAE9hirV9bTcbA3XVLsBkrT1n1W2+GB9kBHMpxMpIuwWKz2o7ZODWJEUY SdC+0fHc8YpIvbvP+GuuIL4Bn7VjLpXTp7ONLDe6FfgpCzR3oyX3KSjnHJQ4t5aDpRPql8mnJ L4LM2RV0K3srPZizZplbH2mVWsUWdFly9gb/AwsUxDH0ts+jxSOhWqe67AEj8mmql5+TOLUxr 4LHwXc1wIf2Mb74vSUJimNdOjxeq7GFlB8GOvispsDlMyIC15VPDo2ysKuoV+hZfTqaVcyhaJ HCRhSLNBCPDkD6ARRp/MpdnNyJ+ceMOIkaRQFahJRTDCJYnlaGBqL/BuAYX3PgKBHreH7aieb It0hKrUfKIvZncGgmVrQvpEcVK7I+MutyUDvA5lC1fyOoBYYBhb2DN+KsOIExZ6y1wbbLOJS/ alFN4EmO91HYQ= Received-SPF: pass client-ip=212.227.17.21; 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:127665 Archived-At: I have a minor-mode with the option to (1) highlight tex keywords [] and (2) positioning superscripts and subscripts [supinf]. With the minor mode enabled I want highlight tex keywords only and when crucible-supinf-enable do the positioning. Perhaps people have some ideas that would make the code simpler than what I have done below. (defun supinf-typeface-crucible () "Font-lock setup for mathematical symbols." (font-lock-flush (point-min) (point-max)) (if crucible-mode (font-lock-add-keywords nil tex-keywords-cruc t) (font-lock-remove-keywords nil tex-keywords-cruc)) (if crucible-supinf-enable (font-lock-add-keywords nil supinf-font-lock-cruc t) (supinf-disable-cruc (point-min) (point-max))) (font-lock-flush (point-min) (point-max)))