From: michaelgrunewald@yahoo.fr (Michaël Grünewald)
To: help-gnu-emacs@gnu.org
Subject: Re: How to get rid of some font effects
Date: Sun, 14 Oct 2007 23:05:47 +0200 [thread overview]
Message-ID: <86bqb14das.fsf@Llea.celt.neu> (raw)
In-Reply-To: jwvmyurvta9.fsf-monnier+gnu.emacs.help@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2007-10-14 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 17:43 How to get rid of some font effects Michaël Grünewald
2007-10-10 16:18 ` Stefan Monnier
2007-10-14 21:05 ` Michaël Grünewald [this message]
2007-10-17 18:12 ` Stefan Monnier
2007-11-10 6:56 ` Michaël Grünewald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bqb14das.fsf@Llea.celt.neu \
--to=michaelgrunewald@yahoo.fr \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).