From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michaelgrunewald@yahoo.fr (=?iso-8859-1?Q?Micha=EBl_Gr=FCnewald?=) Newsgroups: gmane.emacs.help Subject: Re: How to get rid of some font effects Date: Sun, 14 Oct 2007 23:05:47 +0200 Organization: Guest of ProXad - France Message-ID: <86bqb14das.fsf@Llea.celt.neu> References: <86wsu6loij.fsf@Llea.celt.neu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1192398087 31770 80.91.229.12 (14 Oct 2007 21:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2007 21:41:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 14 23:41:18 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IhBD2-0008At-ES for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 23:41:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IhBCv-00040n-Q2 for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Oct 2007 17:41:09 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!feeder.news-service.com!club-internet.fr!feedme-small.clubint.net!feeder1-1.proxad.net!proxad.net!feeder2-2.proxad.net!cleanfeed1-b.proxad.net!nnrp13-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) Cancel-Lock: sha1:PQIT3Uo9Mw412DiojA5BulaGLXA= Original-Lines: 34 Original-NNTP-Posting-Date: 14 Oct 2007 23:01:52 MEST Original-NNTP-Posting-Host: 82.236.236.194 Original-X-Trace: 1192395712 news-2.free.fr 7821 82.236.236.194:57834 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:152915 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48419 Archived-At: Stefan Monnier writes: >> In the same vein, is there any way to globally disallow vertical >> shifting of text? Being very specific, tex-mode shifts superscript and >> subscript material vertically, and I find this inadequate. Is there >> any clean way to turn this off? I have found this in tex-mode.el: > > You can play with font-lock-maximum-decoration (the super/subscript in > latex-mode are only enabled with the very top decoration level). Thank you for the tip. Meanwhile, I have used this *ugly* thing: (require 'tex-mode) (defun tex-font-lock-suscript (pos) (unless (or (memq (get-text-property pos 'face) '(font-lock-constant-face font-lock-builtin-face font-lock-comment-face tex-verbatim)) ;; Check for backslash quoting (let ((odd nil) (pos pos)) (while (eq (char-before pos) ?\\) (setq pos (1- pos) odd (not odd))) odd)) (if (eq (char-after pos) ?_) '(face subscript display (raise -0.0)) '(face superscript display (raise +0.0))))) (see the nullified raise parameters?) I am very happy to remove that from my dot.emacs file. Thank you again! -- Best wishes, Michaël