Function: reftex-fontify-select-label-buffer

reftex-fontify-select-label-buffer is a byte-compiled function defined in reftex.el.gz.

Signature

(reftex-fontify-select-label-buffer PARENT-BUFFER)

Documentation

Fontify the *RefTeX Select* buffer.

Buffer is temporarily renamed to start with none-SPC char, because Font-Lock otherwise refuses operation.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex.el.gz
(defun reftex-fontify-select-label-buffer (parent-buffer)
  "Fontify the `*RefTeX Select*' buffer.
Buffer is temporarily renamed to start with none-SPC char, because
Font-Lock otherwise refuses operation."
  (run-hook-with-args 'reftex-pre-refontification-functions
                      parent-buffer 'reftex-ref)
  (let* ((oldname (buffer-name))
         (newname (concat "Fontify-me-" oldname)))
    (unwind-protect
        (progn
          ;; Rename buffer temporarily to start without space (because
          ;; of font-lock)
          (rename-buffer newname t)
          ;; Good: we have the indirection functions
          (setq-local font-lock-fontify-region-function
                      #'reftex-select-font-lock-fontify-region)
          (let ((major-mode 'latex-mode))
            (font-lock-mode 1)))
      (rename-buffer oldname))))