diff options
| author | Dave Love | 1998-02-09 19:40:38 +0000 |
|---|---|---|
| committer | Dave Love | 1998-02-09 19:40:38 +0000 |
| commit | b5812513a487b49af64d1db729e6c93368cedb71 (patch) | |
| tree | 621192657a7f1d07c0cf1311b49b3cda7654c911 | |
| parent | 529724fec7ce48fe562991a753736da2009bb7df (diff) | |
| download | emacs-b5812513a487b49af64d1db729e6c93368cedb71.tar.gz emacs-b5812513a487b49af64d1db729e6c93368cedb71.zip | |
(compilation-scroll-output): New variable.
(compile-internal): Use it. Set lazy-lock-defer-on-scrolling.
| -rw-r--r-- | lisp/progmodes/compile.el | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0541257b0a6..7b9b9085b36 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. | 1 | ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Roland McGrath <roland@prep.ai.mit.edu> | 5 | ;; Author: Roland McGrath <roland@prep.ai.mit.edu> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -580,6 +580,16 @@ easily repeat a find command." | |||
| 580 | (let ((grep-null-device nil)) ; see grep | 580 | (let ((grep-null-device nil)) ; see grep |
| 581 | (grep command-args))) | 581 | (grep command-args))) |
| 582 | 582 | ||
| 583 | (defcustom compilation-scroll-output nil | ||
| 584 | "*Non-nil to scroll the *compilation* buffer window as output appears. | ||
| 585 | |||
| 586 | Setting it causes the compilation-mode commands to put point at the | ||
| 587 | end of their output window so that the end of the output is always | ||
| 588 | visible rather than the begining." | ||
| 589 | :type 'boolean | ||
| 590 | :version 20.3 | ||
| 591 | :group 'compilation) | ||
| 592 | |||
| 583 | (defun compile-internal (command error-message | 593 | (defun compile-internal (command error-message |
| 584 | &optional name-of-mode parser | 594 | &optional name-of-mode parser |
| 585 | error-regexp-alist name-function | 595 | error-regexp-alist name-function |
| @@ -686,6 +696,10 @@ Returns the compilation buffer created." | |||
| 686 | error-regexp-alist name-function | 696 | error-regexp-alist name-function |
| 687 | enter-regexp-alist leave-regexp-alist | 697 | enter-regexp-alist leave-regexp-alist |
| 688 | file-regexp-alist nomessage-regexp-alist)) | 698 | file-regexp-alist nomessage-regexp-alist)) |
| 699 | (make-local-variable 'lazy-lock-defer-on-scrolling) | ||
| 700 | ;; This proves a good idea if the buffer's going to scroll | ||
| 701 | ;; with lazy-lock on. | ||
| 702 | (setq lazy-lock-defer-on-scrolling t) | ||
| 689 | (setq default-directory thisdir | 703 | (setq default-directory thisdir |
| 690 | compilation-directory-stack (list default-directory)) | 704 | compilation-directory-stack (list default-directory)) |
| 691 | (set-window-start outwin (point-min)) | 705 | (set-window-start outwin (point-min)) |
| @@ -726,7 +740,12 @@ exited abnormally with code %d\n" | |||
| 726 | (concat status "\n"))) | 740 | (concat status "\n"))) |
| 727 | (t | 741 | (t |
| 728 | (compilation-handle-exit 'bizarre status status)))) | 742 | (compilation-handle-exit 'bizarre status status)))) |
| 729 | (message "Executing `%s'...done" command)))) | 743 | (message "Executing `%s'...done" command))) |
| 744 | (if compilation-scroll-output | ||
| 745 | (let ((currbuf (current-buffer))) | ||
| 746 | (select-window outwin) | ||
| 747 | (goto-char (point-max)) | ||
| 748 | (select-window (get-buffer-window currbuf))))) | ||
| 730 | ;; Make it so the next C-x ` will use this buffer. | 749 | ;; Make it so the next C-x ` will use this buffer. |
| 731 | (setq compilation-last-buffer outbuf))) | 750 | (setq compilation-last-buffer outbuf))) |
| 732 | 751 | ||