Function: window-point-context-use

window-point-context-use is a byte-compiled function defined in window.el.gz.

Signature

(window-point-context-use)

Documentation

Use context to relocate the window point.

Call function specified by window-point-context-use-function to move the window point according to the previously saved context. For every live window on the selected frame this function is called with two arguments: the window and the context data structure saved by window-point-context-set-function in the window parameter context. The function called is supposed to set the window point to the location found by the provided context.

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun window-point-context-use ()
  "Use context to relocate the window point.
Call function specified by `window-point-context-use-function' to move the
window point according to the previously saved context.  For every live
window on the selected frame this function is called with two arguments:
the window and the context data structure saved by
`window-point-context-set-function' in the window parameter `context'.
The function called is supposed to set the window point to the location
found by the provided context."
  (walk-windows
   (lambda (w)
     (when-let ((fn (buffer-local-value 'window-point-context-use-function
                                        (window-buffer w)))
                ((functionp fn))
                (context (window-parameter w 'context))
                ((equal (buffer-name (window-buffer w)) (car context))))
       (funcall fn w (cdr context))
       (set-window-parameter w 'context nil)))
   'nomini))