Mercurial > emacs
comparison lisp/progmodes/compile.el @ 90988:492971a3f31f unicode-xft-base
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 816-823)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 59-69)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 237-238)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-235
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 24 Jul 2007 01:23:55 +0000 |
parents | a66921565bcb af49557163c6 |
children | f55f9811f5d7 |
comparison
equal
deleted
inserted
replaced
90987:b2d8a283f27e | 90988:492971a3f31f |
---|---|
605 (defvar compilation-error-list nil) | 605 (defvar compilation-error-list nil) |
606 (defvar compilation-old-error-list nil) | 606 (defvar compilation-old-error-list nil) |
607 | 607 |
608 (defcustom compilation-auto-jump-to-first-error nil | 608 (defcustom compilation-auto-jump-to-first-error nil |
609 "If non-nil, automatically jump to the first error after `compile'." | 609 "If non-nil, automatically jump to the first error after `compile'." |
610 :type 'boolean) | 610 :type 'boolean |
611 :group 'compilation | |
612 :version "23.1") | |
611 | 613 |
612 (defvar compilation-auto-jump-to-next nil | 614 (defvar compilation-auto-jump-to-next nil |
613 "If non-nil, automatically jump to the next error encountered.") | 615 "If non-nil, automatically jump to the next error encountered.") |
614 (make-variable-buffer-local 'compilation-auto-jump-to-next) | 616 (make-variable-buffer-local 'compilation-auto-jump-to-next) |
615 | 617 |
932 command)) | 934 command)) |
933 (consp current-prefix-arg))) | 935 (consp current-prefix-arg))) |
934 (unless (equal command (eval compile-command)) | 936 (unless (equal command (eval compile-command)) |
935 (setq compile-command command)) | 937 (setq compile-command command)) |
936 (save-some-buffers (not compilation-ask-about-save) nil) | 938 (save-some-buffers (not compilation-ask-about-save) nil) |
937 (setq compilation-directory default-directory) | 939 (setq-default compilation-directory default-directory) |
938 (compilation-start command comint)) | 940 (compilation-start command comint)) |
939 | 941 |
940 ;; run compile with the default command line | 942 ;; run compile with the default command line |
941 (defun recompile () | 943 (defun recompile () |
942 "Re-compile the program including the current buffer. | 944 "Re-compile the program including the current buffer. |
943 If this is run in a Compilation mode buffer, re-use the arguments from the | 945 If this is run in a Compilation mode buffer, re-use the arguments from the |
944 original use. Otherwise, recompile using `compile-command'." | 946 original use. Otherwise, recompile using `compile-command'." |
945 (interactive) | 947 (interactive) |
946 (save-some-buffers (not compilation-ask-about-save) nil) | 948 (save-some-buffers (not compilation-ask-about-save) nil) |
947 (let ((default-directory | 949 (let ((default-directory (or compilation-directory default-directory))) |
948 (or (and (not (eq major-mode (nth 1 compilation-arguments))) | |
949 compilation-directory) | |
950 default-directory))) | |
951 (apply 'compilation-start (or compilation-arguments | 950 (apply 'compilation-start (or compilation-arguments |
952 `(,(eval compile-command)))))) | 951 `(,(eval compile-command)))))) |
953 | 952 |
954 (defcustom compilation-scroll-output nil | 953 (defcustom compilation-scroll-output nil |
955 "Non-nil to scroll the *compilation* buffer window as output appears. | 954 "Non-nil to scroll the *compilation* buffer window as output appears. |
1040 (error "Cannot have two processes in `%s' at once" | 1039 (error "Cannot have two processes in `%s' at once" |
1041 (buffer-name))))) | 1040 (buffer-name))))) |
1042 (buffer-disable-undo (current-buffer)) | 1041 (buffer-disable-undo (current-buffer)) |
1043 ;; first transfer directory from where M-x compile was called | 1042 ;; first transfer directory from where M-x compile was called |
1044 (setq default-directory thisdir) | 1043 (setq default-directory thisdir) |
1044 ;; Remember the original dir, so we can use it when we recompile. | |
1045 ;; default-directory' can't be used reliably for that because it may be | |
1046 ;; affected by the special handling of "cd ...;". | |
1047 (set (make-local-variable 'compilation-directory) thisdir) | |
1045 ;; Make compilation buffer read-only. The filter can still write it. | 1048 ;; Make compilation buffer read-only. The filter can still write it. |
1046 ;; Clear out the compilation buffer. | 1049 ;; Clear out the compilation buffer. |
1047 (let ((inhibit-read-only t) | 1050 (let ((inhibit-read-only t) |
1048 (default-directory thisdir)) | 1051 (default-directory thisdir)) |
1049 ;; Then evaluate a cd command if any, but don't perform it yet, else | 1052 ;; Then evaluate a cd command if any, but don't perform it yet, else |