Function: TeX-font-replace

TeX-font-replace is a byte-compiled function defined in tex.el.

Signature

(TeX-font-replace START END)

Documentation

Replace font specification around point with START and END.

For modes with font specifications like {\font text}. See also TeX-font-replace-macro and TeX-font-replace-function.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-font-replace (start end)
  "Replace font specification around point with START and END.
For modes with font specifications like `{\\font text}'.
See also `TeX-font-replace-macro' and `TeX-font-replace-function'."
  (save-excursion
    (while (not (looking-at "{\\\\[a-zA-Z]+ "))
      (up-list -1))
    (forward-sexp)
    (save-excursion
      (replace-match start t t))
    (if (save-excursion
          (backward-char 3)
          (if (looking-at (regexp-quote "\\/}"))
              (progn
                (delete-char 3)
                nil)
            t))
        (delete-char -1))
    (insert end)))