Function: makeinfo-recenter-compilation-buffer

makeinfo-recenter-compilation-buffer is an autoloaded, interactive and byte-compiled function defined in makeinfo.el.gz.

Signature

(makeinfo-recenter-compilation-buffer LINENUM)

Documentation

Redisplay *compilation* buffer so most recent output can be seen.

The last line of the buffer is displayed on line LINE of the window, or centered if LINE is nil.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/makeinfo.el.gz
;;;###autoload
(defun makeinfo-recenter-compilation-buffer (linenum)
  "Redisplay `*compilation*' buffer so most recent output can be seen.
The last line of the buffer is displayed on
line LINE of the window, or centered if LINE is nil."
  (interactive "P")
  (let ((makeinfo-buffer (get-buffer "*compilation*"))
	(old-buffer (current-buffer)))
    (if (null makeinfo-buffer)
	(message "No *compilation* buffer")
      (pop-to-buffer makeinfo-buffer)
      (bury-buffer makeinfo-buffer)
      (goto-char (point-max))
      (recenter (if linenum
		    (prefix-numeric-value linenum)
		  (/ (window-height) 2)))
      (pop-to-buffer old-buffer)
      )))