Function: compilation-set-window

compilation-set-window is a byte-compiled function defined in compile.el.gz.

Signature

(compilation-set-window W MK)

Documentation

Maybe align the compilation output window W with marker MK near top.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
(defsubst compilation-set-window (w mk)
  "Maybe align the compilation output window W with marker MK near top."
  (cond ((integerp compilation-context-lines)
         (set-window-start w (save-excursion
			       (goto-char mk)
			       (compilation-beginning-of-line
                                (- 1 compilation-context-lines))
			       (point))))
        ((and (null compilation-context-lines)
              ;; If there is no left fringe.
              (equal (car (window-fringes w)) 0))
         (set-window-start w (save-excursion
                               (goto-char mk)
			       (beginning-of-line 1)
			       (point)))))
  (set-window-point w mk))