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  <[EMAIL PROTECTED]>

        * 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


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to