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

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

Signature

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

Documentation

Show TEXT in a child-frame at the top-left of the current window.

Source Code

;; Defined in /usr/src/emacs/lisp/paren.el.gz
(defun show-paren--show-context-in-child-frame (text)
  "Show TEXT in a child-frame at the top-left of the current window."
  (let ((minibuffer (minibuffer-window (window-frame)))
        (buffer (show-paren--context-child-frame-buffer text))
        (x (window-pixel-left))
        (y (window-pixel-top))
        (window-min-height 1)
        (window-min-width 1)
        after-make-frame-functions)
    (show-paren--delete-context-child-frame)
    (setq show-paren--context-child-frame
          (make-frame
           `((parent-frame . ,(window-frame))
             (minibuffer . ,minibuffer)
             ,@show-paren--context-child-frame-parameters)))
    (let ((win (frame-root-window show-paren--context-child-frame)))
      (set-window-buffer win buffer)
      (set-window-dedicated-p win t)
      (set-frame-size show-paren--context-child-frame
                      (string-width text)
                      (length (string-lines text)))
      (set-frame-position show-paren--context-child-frame x y)
      (make-frame-visible show-paren--context-child-frame)
      (add-hook 'post-command-hook
                #'show-paren--delete-context-child-frame))))