Function: cider-font-lock-region-as

cider-font-lock-region-as is a byte-compiled function defined in cider-util.el.

Signature

(cider-font-lock-region-as MODE BEG END &optional BUFFER)

Documentation

Use MODE to font-lock text between BEG and END.

Unless you specify a BUFFER it will default to the current one.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-util.el
(defun cider-font-lock-region-as (mode beg end &optional buffer)
  "Use MODE to font-lock text between BEG and END.

Unless you specify a BUFFER it will default to the current one."
  (with-current-buffer (or buffer (current-buffer))
    (let ((text (buffer-substring beg end)))
      (delete-region beg end)
      (goto-char beg)
      (insert (cider-font-lock-as mode text)))))