all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karl Chen <quarl@cs.berkeley.edu>
Cc: Stefan Monnier <monnier@gnu.org>
Subject: tex-mode: \bf fontification bug
Date: Sun, 09 Oct 2005 22:01:20 -0700	[thread overview]
Message-ID: <quack.20051009T2201.lthu0fqezj3@roar.cs.berkeley.edu> (raw)


Synopsis:

    emacs -q /tmp/a.tex

    {\bf test}

    M-x font-lock-fontify-buffer

  error("No match %d in highlight %S" 2 (2 (tex-font-lock-append-prop (quote bold)) append))
  font-lock-fontify-keywords-region(1 90 t)
  font-lock-default-fontify-region(1 90 t)
  .
  .

This annoyingly interrupts every time I load a file with \bf.
\bfseries is also fontified incorrectly.

I believe the patch below fixes the bug.

2005-10-09  Karl Chen  <quarl@cs.berkeley.edu>

	* textmodes/tex-mode.el (tex-font-lock-keywords-2): Fix
	bug in \bf fontification


--- /usr/share/emacs/22.0.50/lisp/textmodes/tex-mode.el.gz
+++ /tmp/buffer-content-29951lay
@@ -576,7 +576,7 @@
 	      2 '(tex-font-lock-append-prop 'italic) 'append)
 	;; This is separate from the previous one because of cases like
 	;; {\em foo {\bf bar} bla} where both match.
-	(list (concat "\\\\\\(bf\\(series\\)?\\)\\>" args)
+	(list (concat "\\\\\\(bf\\(?:series\\)?\\)\\>" args)
 	      2 '(tex-font-lock-append-prop 'bold) 'append)))))
    "Gaudy expressions to highlight in TeX modes.")


-- 
Karl 2005-10-09 21:49

             reply	other threads:[~2005-10-10  5:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-10  5:01 Karl Chen [this message]
2005-10-10  9:48 ` tex-mode: \bf fontification bug Andreas Schwab

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=quack.20051009T2201.lthu0fqezj3@roar.cs.berkeley.edu \
    --to=quarl@cs.berkeley.edu \
    --cc=monnier@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.