From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.devel Subject: Re: sub and superscripts: without =?utf-8?B?wqtfwrs=?= and =?utf-8?B?wqtewrs=?= Date: Thu, 03 Sep 2015 09:41:32 +0000 Message-ID: <87vbbrx2k3.fsf@mat.ucm.es> References: <877fo8dbep.fsf@mat.ucm.es> <87613sc7dx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441273330 15871 80.91.229.3 (3 Sep 2015 09:42:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2015 09:42:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 03 11:42:00 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZXR1r-0001lN-6J for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 11:41:59 +0200 Original-Received: from localhost ([::1]:46315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXR1r-00057B-Bi for ged-emacs-devel@m.gmane.org; Thu, 03 Sep 2015 05:41:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXR1n-00056E-Ix for emacs-devel@gnu.org; Thu, 03 Sep 2015 05:41:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXR1j-0000r1-HT for emacs-devel@gnu.org; Thu, 03 Sep 2015 05:41:55 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:41799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXR1j-0000qs-Bp for emacs-devel@gnu.org; Thu, 03 Sep 2015 05:41:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZXR1e-0001d6-Mj for emacs-devel@gnu.org; Thu, 03 Sep 2015 11:41:46 +0200 Original-Received: from gilgamesch.quim.ucm.es ([147.96.12.99]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Sep 2015 11:41:46 +0200 Original-Received: from oub by gilgamesch.quim.ucm.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 03 Sep 2015 11:41:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: gilgamesch.quim.ucm.es Mail-Copies-To: never User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:NjvUoOHUwlLiqJD0sufDbv7WjxA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189496 Archived-At: >>>>> "Tassilo" == Tassilo Horn writes: > Stefan Monnier writes: >>> I asked this on auctex-dev but it might be question concerning core >>> functionality of GNU emacs: >> >> The necessary core functionality has been present for a long time: >> just add the proper `invisible' property to the chars you don't want >> to see. > I guess what Uwe wants is that `prettify-symbols-mode' in a (La)TeX > buffer (with stock latex-mode or AUCTeX; doesn't really matter) could > have the option to make the ^ and _ invisible, too. > I already told him that this is not what p-s-m is meant for. But it's > easy enough to write a custom font-lock rule for that: > (defun th/invisible-super-sub-scripts () > (interactive) > (cl-pushnew 'invisible font-lock-extra-managed-props) > (font-lock-add-keywords > nil > '(("[^\\\\]\\([_^]\\)" (1 '(face nil invisible t) t)))) > (font-lock-flush)) > Uwe, if you want you could do something like that: > (add-hook 'prettify-symbols-mode-hook > (lambda () > (when (eq major-mode 'latex-mode) > (th/invisible-super-sub-scripts)))) Cool!! Precisely what I wanted thanks very much!