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: tex-mode.el Date: Thu, 11 Feb 2021 05:01:08 +0100 Message-ID: References: <878s7xkvgi.fsf@zoho.eu> <87im71jeew.fsf@zoho.eu> <20210209201315.GD30277@tuxteam.de> <20210209204537.GE30277@tuxteam.de> <877dngtw7l.fsf@web.de> <87a6sbxob4.fsf@web.de> 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="19226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 11 05:02:26 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 1lA3BR-0004tu-Vh for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 11 Feb 2021 05:02:25 +0100 Original-Received: from localhost ([::1]:35672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lA3BR-0001Tp-1Q for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 10 Feb 2021 23:02:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lA3AJ-0001TU-4O for help-gnu-emacs@gnu.org; Wed, 10 Feb 2021 23:01:15 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:41109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lA3AE-0006Aw-MB for help-gnu-emacs@gnu.org; Wed, 10 Feb 2021 23:01:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613016068; bh=DBItNvPCwJ55YTxr+R4RraVmJLA3SdqMycptCzc2d+g=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=eTyl1tyaxvAPlQM3weSienu2IdtYLzJmYJrBGptiOy2j8oD4BRMV4f1wixvsv8342 OtVqhPc9VztnON8bO2OJBs/ippQvZyts6BSATJRY5ui2Fukp0Oe8MUq6JhIeUMzEgX U38/i0vUITGIcPAPJ2FDcigMt04dO6D8Aj4KN4ik= 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); Thu, 11 Feb 2021 05:01:08 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87a6sbxob4.fsf@web.de> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:BdAymcXnHT/D/p50qIbO5KvbQ13fCRoLwYo/TMV7hPNYUebFlzNxciODM0BD/wWGCozor kw6lSTFhuE8ufnXhTZCSS6V82/oHrTjMqDkl6C+eSYe1wcFX+F9eJzGW0zaetuBy1AorgLoKswZo 4/8LsC7727SkytSgGSdMEG93IlYLhV+OTWS3vad3qiEIHtXwgbBVuQ8uLvsxUkdWVPM2sc14MRRM 9EIFsrJ9T9WMKp9M9M3McZv97qPxbvFs0nqazK05dGaARL2hIEggYjT8YP+8/yCnXQPRVeAkEVLn 64= X-UI-Out-Filterresults: notjunk:1;V03:K0:39Aaqs1gpk4=:X5cxgnXHBUKkRTCb9Re5yA e9QutUZLePhs6RVm1DxImP9SAyxIdbf+BQ6Ba+1wUriYEzxlGsW3htoNL83xRZTspQF1ynfJr fyScr1cHdX0F3jAd9nzlClVf6jZU4o60phVBacJBQqzn3lIEOT6WQdUiyQ4ADtIlCngoKh+n0 BD0ym+RJmg/Wr3ex7igiesPumxQBG3+weADULW3RvJwmD/somSc/p9vqew67STEZu+tStV391 +n6vcjQxkw8ziCykiO+P+VyE6Z4uUt8OaVTDGGNlbmhP6R+NA14Wsr0GS//K79iZ3Cf2k+QdV UeunjwfCFLJ2Rxm+fIaVDDz1w2sWIkbGsQNoZjXIKHWUU6n2h2mEnYYal7TsnRzqY8WNhqI4l slvy9pkf6HjTfQhUWV43cEqvUqkvIW7Pnccc1FkjIj9xk7o0e1ZTSfyylYcbFpXQcwxOKhj8N wjFi1GGujGGNGFTkfTkEQiQypaxmFaTtqgC96VvRkhZ9qc1YLuM9g7SWSV5H0FC0bp2eeTx1S 9ppJ5oOuYl3ePf5cvjx+4Lne+be9DFa+dg4t6j+0jLsZkhsWjP6lSut507qIKF6ea/JXes+gu f+Ulvro3v0FdI= Received-SPF: pass client-ip=212.227.15.19; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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:127799 Archived-At: When I used "tex-mode.el", the suscript fontification can be disabled using the following function. But does not work with my minor-mode. (defun supinf-disable () (interactive) (setq-local tex-fontify-script nil) (font-lock-flush)) I am trying to have two functions, one to enable, another to disable. Enabling is also creating me problems to set up. The code in tex-mode.el is in quite a mess and surely does not help a lot. > Sent: Thursday, February 11, 2021 at 3:42 PM > From: "Michael Heerdegen" > To: help-gnu-emacs@gnu.org > Subject: Re: tex-mode.el > > Christopher, > > After commenting out the `multic' expression I could try your example. > > I'm not really skilled with font-lock. > > I think in your case `font-lock-flush' is indeed not enough, I think > that one doesn't unfontify, which has to be done in your case. > `font-lock-refresh-defaults' as had been suggested should be better. > > Your unfontify function seems to work when called (tested). But is it > called? > > I think here: > > (defun supinf-disable () > "Disable the supinf typeface" > (font-lock-flush (point-min) (point-max)) > (setq font-lock-defaults > '(font-lock-unfontify-region-function . supinf-disable-cruc)) > ^^^^ > ;;(supinf-disable-cruc (point-min) (point-max)) > (font-lock-flush (point-min) (point-max)) ) Yes, it was a bad attempt from my part. It was the routine hack I was playing with. > you are missing a level of parens. Then, with some good will, the thing > could indeed work I think. > > Oh, and it seems something in your mode is not done buffer locally, > since the ^^^^ underlining here now looks weird in my messages buffer, > where I definitely didn't enable your mode. Or maybe just a side effect > of experimenting, dunno. > > HTH, > > Michael. > > >