Function: global-hl-line-window-redisplay

global-hl-line-window-redisplay is a byte-compiled function defined in hl-line.el.gz.

Signature

(global-hl-line-window-redisplay WINDOW)

Documentation

Highlight the overlay that indicates the line with window's point.

Source Code

;; Defined in /usr/src/emacs/lisp/hl-line.el.gz
(defun global-hl-line-window-redisplay (window)
  "Highlight the overlay that indicates the line with window's point."
  (let ((rol (window-parameter window 'hl-line-overlay)))
    (with-current-buffer (window-buffer window)
      (if (buffer-match-p global-hl-line-buffers (current-buffer))
          (let* ((bounds (save-excursion
                           (goto-char (window-point window))
                           (if hl-line-range-function
                               (funcall hl-line-range-function)
                             (cons (line-beginning-position)
                                   (line-beginning-position 2)))))
                 (new (redisplay--highlight-overlay-function
                       (car bounds) (cdr bounds) window rol
                       (if (eq window (selected-window))
                           'hl-line 'hl-line-nonselected))))
            (unless (equal new rol)
              (set-window-parameter window 'hl-line-overlay new)))
        (redisplay--unhighlight-overlay-function rol)))))