Function: show-paren--context-child-frame-buffer

show-paren--context-child-frame-buffer is a byte-compiled function defined in paren.el.gz.

Signature

(show-paren--context-child-frame-buffer TEXT)

Source Code

;; Defined in /usr/src/emacs/lisp/paren.el.gz
(defun show-paren--context-child-frame-buffer (text)
  (with-current-buffer
      (get-buffer-create " *show-paren context*")
    ;; Redirect focus to parent.
    (add-hook 'pre-command-hook
              #'show-paren--delete-context-child-frame
              nil t)
    ;; Use an empty keymap.
    (use-local-map (make-keymap))
    (dolist (var '((mode-line-format . nil)
                   (header-line-format . nil)
                   (tab-line-format . nil)
                   (tab-bar-format . nil) ;; Emacs 28 tab-bar-format
                   (frame-title-format . "")
                   (truncate-lines . t)
                   (cursor-in-non-selected-windows . nil)
                   (cursor-type . nil)
                   (show-trailing-whitespace . nil)
                   (display-line-numbers . nil)
                   (left-fringe-width . nil)
                   (right-fringe-width . nil)
                   (left-margin-width . 0)
                   (right-margin-width . 0)
                   (fringes-outside-margins . 0)
                   (buffer-read-only . t)))
      (set (make-local-variable (car var)) (cdr var)))
    (let ((inhibit-modification-hooks t)
          (inhibit-read-only t))
      (erase-buffer)
      (insert text)
      (goto-char (point-min)))
    (current-buffer)))