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: Separating colour and positioning functioning Date: Mon, 8 Feb 2021 16:02:17 +0100 Message-ID: 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="27726"; 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 Mon Feb 08 20:45:25 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 1l9CTN-00077K-2p for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 20:45:25 +0100 Original-Received: from localhost ([::1]:52684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9CTM-0002be-5y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Feb 2021 14:45:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l983s-0001D9-0y for help-gnu-emacs@gnu.org; Mon, 08 Feb 2021 10:02:48 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:37767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l983T-0002k4-E3 for help-gnu-emacs@gnu.org; Mon, 08 Feb 2021 10:02:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612796537; bh=A6wPf9YG+WSC//6vA+jUDxnHML4lZ0OMVPoqSwTjo18=; h=X-UI-Sender-Class:From:To:Subject:Date; b=VKV8OewH079aFGasXLJRqsTNjaFxW0ozObq1VglBAeDYLG9/PWPWAC9Li8NaPLCLf Op+KD2NlTsRLglnZyhsZWWv+921Nu3SQM9GaHI3CT0pcGc9NF/2YBChGfXh6griRCi wxS9WBD0EwOyZGI23EMEV8eiJ0W7x3Q770++yFLI= 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-bs01.server.lan [172.19.170.58]) (via HTTP); Mon, 8 Feb 2021 16:02:17 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:gcWFqXgO3ToQQ0PrVGPVCDyPowoaz4noD+8kR2bl54xAP8pztaRQncBK1l9ucoy3/MxyS Q/olvqbyI21+riQgEj0Q95wM3NFuGDruv/KsqZqFOJCMW5dS9dhS4jg+e010eyIiDR11hRC1bH6n 6OoQAdFWFXyjX46cioqIOhv44kE9iaTrB/attJfSfY1H3Ibg21vjOkrp9B6FnhsTio+n7ACIWkZn nBwxG4+VUInW5Ki/hCxZ8m0nc0tY3lWmwr7G5Vx6nQvRpTmvuDilxnZX1jMAAG1FsPweQEzsga0H Og= X-UI-Out-Filterresults: notjunk:1;V03:K0:Vu9f6NjXE9g=:DBVG02JwpY28XaYYtRD0rg U48XxwBPh4b9ea6f940aVyv+7JN1qESnKlxHiK/yGAZcfjD8hhNPhikZBbVcLMkbIBqGfkEqN Lm0VFKBaQQGaV8V4Hg9LJ1I3KTqEocCX/LaTBdjthAmjfu3nFwFemEd3RIbmC7CL69r67bclv u5LLQxiNagJzpygFaN4AH0pzLXH9+n9s4njnGt2payXpVQxf4Q/PirLV1MTdrrHPW4cOkekXm GbhXXWkvzLFkFeCM+uNEtUIcSpZQ2mZBzbO0hJ7b5smgHGMPhHMtEt8vvOxB9tSV/L57tovWu WomzHSvEn0XJvxxgazONrQGdK43ka8Fo7tioev1mqJIncX32j/1pCSrs2jn92uLBeJ7+hfbip KbMXo91Dd4gt9ZdrtvHFVW4WSpII3ny/2r6yjRCF72ZcQiODrSoyyECIPWIYo8dFxKdmryL3j K1vPr+7uqRek2YoF5o3dJ0adviyRSsvpNeXECFJVoC0ce8g33dS32W0bNa69uvsFYB3sD89KW s1L8n7+H7Z2c8k1rcjzqmnqirxUZkyYPKXByqKH5rkyIpiOe8jcEKhy60soWZm3eQnMRN/V8W vAiWnovR7nptI= Received-SPF: pass client-ip=212.227.15.18; 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, 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:127661 Archived-At: Have written a minor mode with part of the the code below and want to modify tex-typeface-crucible so that the colour scheme is enabled when the minor-mode is on. Then one can apply supinf as an option (defface colour-tex-cruc '( (default :inherit bold) ( ((class color) (min-colors 88) (background light)) :foreground "#FF0000" ) ( ((class color) (min-colors 88) (background dark)) :foreground "#FF0000") (t :inherit font-lock-builtin-face) ) "Typeface for tex keywords.") (defconst crucible-tex-keywords `( (,(rx "\\" word-start (group (or "alpha" "beta")) word-end) (1 'colour-tex-cruc)) ) "Fontification for letters and symbols.") (defun supinf-disable-cruc (beg end) "Set typeface for text between BEG and END." (font-lock-default-unfontify-region beg end) (while (< beg end) (let ((next (next-single-property-change beg 'display nil end)) (prop (get-text-property beg 'display))) (if (and (eq (car-safe prop) 'raise) (member (car-safe (cdr prop)) crucible-supinf-vshift) (null (cddr prop))) (put-text-property beg next 'display nil)) (setq beg next)))) (defun tex-typeface-crucible () "Font-lock setup for mathematical symbols." (font-lock-flush (point-min) (point-max)) (if crucible-supinf-enable (progn (font-lock-add-keywords nil crucible-tex-keywords t) (font-lock-add-keywords nil supinf-font-lock-cruc t)) (font-lock-remove-keywords nil crucible-tex-keywords) (supinf-disable-cruc (point-min) (point-max))) (font-lock-flush (point-min) (point-max)))