Function: posframe-run-poshandler

posframe-run-poshandler is a byte-compiled function defined in posframe.el.

Signature

(posframe-run-poshandler INFO)

Documentation

Run posframe's position handler.

the structure of INFO can be found in docstring of posframe-show.

Source Code

;; Defined in ~/.emacs.d/elpa/posframe-20260415.14/posframe.el
;; Posframe's position handler
(defun posframe-run-poshandler (info)
  "Run posframe's position handler.

the structure of INFO can be found in docstring
of `posframe-show'."
  (if (equal info posframe--last-poshandler-info)
      posframe--last-posframe-pixel-position
    (setq posframe--last-poshandler-info info)
    (let* ((ref-position (plist-get info :ref-position))
           (poshandler (posframe--get-valid-poshandler info))
           (position (funcall poshandler info)))
      (if (not ref-position)
          position
        (posframe--calculate-new-position
         info position ref-position)))))