Function: window-point-context-set

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

Signature

(window-point-context-set)

Documentation

Set context near the window point.

Call function specified by window-point-context-set-function for every live window on the selected frame with that window as sole argument. The function called is supposed to return a context of the window's point that can be later used as argument for window-point-context-use-function. Remember the returned context in the window parameter context.

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/window.el.gz
;;; Window point context

(defun window-point-context-set ()
  "Set context near the window point.
Call function specified by `window-point-context-set-function' for every
live window on the selected frame with that window as sole argument.
The function called is supposed to return a context of the window's point
that can be later used as argument for `window-point-context-use-function'.
Remember the returned context in the window parameter `context'."
  (walk-windows
   (lambda (w)
     (when-let* ((fn (buffer-local-value 'window-point-context-set-function
                                         (window-buffer w)))
                 ((functionp fn))
                 (context (funcall fn w)))
       (set-window-parameter
        w 'context (cons (buffer-name (window-buffer w)) context))))
   'nomini))