Function: windmove-reference-loc
windmove-reference-loc is a byte-compiled function defined in
windmove.el.gz.
This function is obsolete since 27.1; no longer used.
Signature
(windmove-reference-loc &optional ARG WINDOW)
Documentation
Return the reference location for directional window selection.
Return a coordinate (HPOS . VPOS) that is frame-based. If ARG is nil or not supplied, the reference point is the buffer's point in the currently-selected window, or WINDOW if supplied; otherwise, it is the top-left or bottom-right corner of the selected window, or WINDOW if supplied, if ARG is greater or smaller than zero, respectively.
Probably introduced at or before Emacs version 27.1.
Source Code
;; Defined in /usr/src/emacs/lisp/windmove.el.gz
(defun windmove-reference-loc (&optional arg window)
"Return the reference location for directional window selection.
Return a coordinate (HPOS . VPOS) that is frame-based. If ARG is nil
or not supplied, the reference point is the buffer's point in the
currently-selected window, or WINDOW if supplied; otherwise, it is the
top-left or bottom-right corner of the selected window, or WINDOW if
supplied, if ARG is greater or smaller than zero, respectively."
(declare (obsolete "no longer used." "27.1"))
(let ((effective-arg (if (null arg) 0 (prefix-numeric-value arg)))
(edges (window-inside-edges window)))
(let ((top-left (cons (nth 0 edges)
(nth 1 edges)))
;; Subtracting 1 converts the edge to the last column or line
;; within the window.
(bottom-right (cons (- (nth 2 edges) 1)
(- (nth 3 edges) 1))))
(cond
((> effective-arg 0)
top-left)
((< effective-arg 0)
bottom-right)
((= effective-arg 0)
(with-suppressed-warnings ((obsolete windmove-coord-add))
(windmove-coord-add
top-left
;; Don't care whether window is horizontally scrolled -
;; `posn-at-point' handles that already. See also:
;; https://lists.gnu.org/r/emacs-devel/2012-01/msg00638.html
(posn-col-row
(posn-at-point (window-point window) window)))))))))