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: How to get rid of some font effects Date: Mon, 01 Oct 2007 19:43:00 +0200 Organization: Guest of ProXad - France Message-ID: <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: sea.gmane.org 1191280027 2842 80.91.229.12 (1 Oct 2007 23:07:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2007 23:07:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 02 01:07:04 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 1IcULq-0003Zq-3j for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Oct 2007 01:06:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcULk-0003Kd-OS for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Oct 2007 19:06:52 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.freenet.de!feeder.news-service.com!feeder.news-service.com!club-internet.fr!feedme-small.clubint.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp15-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:bdEQaLYSXl0U6Bi9/0AUVIGx+sE= Original-Lines: 48 Original-NNTP-Posting-Date: 01 Oct 2007 19:39:38 MEST Original-NNTP-Posting-Host: 82.236.236.194 Original-X-Trace: 1191260378 news-4.free.fr 21614 82.236.236.194:51208 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:152516 X-Mailman-Approved-At: Mon, 01 Oct 2007 19:06:37 -0400 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:48033 Archived-At: Hi all, I find some font attributes very annoying and I would like to turn them globally off. More precisely I would like to allow only colour change and bold face, and disallow any other stuff, like size change or underline. Is there any way to do this? 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: (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.3)) '(face superscript display (raise +0.3))))) (defun tex-font-lock-match-suscript (limit) "Match subscript and superscript patterns up to LIMIT." (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\ \\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|\\({\\)\\)" limit t) (when (match-end 3) (let ((beg (match-beginning 3)) (end (save-restriction (narrow-to-region (point-min) limit) (condition-case nil (scan-lists (point) 1 1) (error nil))))) (store-match-data (if end (list (match-beginning 0) end beg end) (list beg beg beg beg))))) t)) I guess I can patch these functions in my dot.elisp file, but I would not call this `clean'. At a last resort, emacs -nw is a viable solution, anyway... -- Thanks in advance for any help, best wishes, Michaël