diff options
| author | Miles Bader | 2007-08-03 05:58:06 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-03 05:58:06 +0000 |
| commit | 2ca773ca40d2c1896757e6382aefff6d9de1c5cc (patch) | |
| tree | 846419ece5e5d8bc8f11e9786598678af9c78f00 /lisp/progmodes | |
| parent | 49b23c2a404cf31fb1aeecc7932a7304aaf16a67 (diff) | |
| parent | 0896d93184a719bc994a3e699de27190aac0acb1 (diff) | |
| download | emacs-2ca773ca40d2c1896757e6382aefff6d9de1c5cc.tar.gz emacs-2ca773ca40d2c1896757e6382aefff6d9de1c5cc.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 843-845)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 84-87)
- Update from CVS
- Change capitalization of VC backend names for new backends
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-30
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/compile.el | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 2710066c2cd..caf0e94b927 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -917,11 +917,13 @@ non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. | |||
| 917 | Additionally, with universal prefix arg, compilation buffer will be in | 917 | Additionally, with universal prefix arg, compilation buffer will be in |
| 918 | comint mode, i.e. interactive. | 918 | comint mode, i.e. interactive. |
| 919 | 919 | ||
| 920 | To run more than one compilation at once, start one and rename | 920 | To run more than one compilation at once, start one then rename |
| 921 | the \`*compilation*' buffer to some other name with | 921 | the \`*compilation*' buffer to some other name with |
| 922 | \\[rename-buffer]. Then start the next one. On most systems, | 922 | \\[rename-buffer]. Then _switch buffers_ and start the new compilation. |
| 923 | termination of the main compilation process kills its | 923 | It will create a new \`*compilation*' buffer. |
| 924 | subprocesses. | 924 | |
| 925 | On most systems, termination of the main compilation process | ||
| 926 | kills its subprocesses. | ||
| 925 | 927 | ||
| 926 | The name used for the buffer is actually whatever is returned by | 928 | The name used for the buffer is actually whatever is returned by |
| 927 | the function in `compilation-buffer-name-function', so you can set that | 929 | the function in `compilation-buffer-name-function', so you can set that |
| @@ -970,7 +972,7 @@ visible rather than the beginning." | |||
| 970 | If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME | 972 | If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME |
| 971 | to determine the buffer name. | 973 | to determine the buffer name. |
| 972 | Likewise if `compilation-buffer-name-function' is non-nil. | 974 | Likewise if `compilation-buffer-name-function' is non-nil. |
| 973 | If current buffer is the mode MODE-COMMAND, | 975 | If current buffer has the major mode MODE-COMMAND, |
| 974 | return the name of the current buffer, so that it gets reused. | 976 | return the name of the current buffer, so that it gets reused. |
| 975 | Otherwise, construct a buffer name from MODE-NAME." | 977 | Otherwise, construct a buffer name from MODE-NAME." |
| 976 | (cond (name-function | 978 | (cond (name-function |
| @@ -1009,8 +1011,11 @@ The rest of the arguments are optional; for them, nil means use the default. | |||
| 1009 | 1011 | ||
| 1010 | MODE is the major mode to set in the compilation buffer. Mode | 1012 | MODE is the major mode to set in the compilation buffer. Mode |
| 1011 | may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'. | 1013 | may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'. |
| 1014 | |||
| 1012 | If NAME-FUNCTION is non-nil, call it with one argument (the mode name) | 1015 | If NAME-FUNCTION is non-nil, call it with one argument (the mode name) |
| 1013 | to determine the buffer name. | 1016 | to determine the buffer name. Otherwise, the default is to |
| 1017 | reuses the current buffer if it has the proper major mode, | ||
| 1018 | else use or create a buffer with name based on the major mode. | ||
| 1014 | 1019 | ||
| 1015 | If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight | 1020 | If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight |
| 1016 | the matching section of the visited source line; the default is to use the | 1021 | the matching section of the visited source line; the default is to use the |
| @@ -1617,12 +1622,16 @@ Use this command in a compilation log buffer. Sets the mark at point there." | |||
| 1617 | (setq compilation-current-error (point)) | 1622 | (setq compilation-current-error (point)) |
| 1618 | (next-error-internal))) | 1623 | (next-error-internal))) |
| 1619 | 1624 | ||
| 1620 | ;; Return a compilation buffer. | ||
| 1621 | ;; If the current buffer is a compilation buffer, return it. | ||
| 1622 | ;; Otherwise, look for a compilation buffer and signal an error | ||
| 1623 | ;; if there are none. | ||
| 1624 | (defun compilation-find-buffer (&optional avoid-current) | 1625 | (defun compilation-find-buffer (&optional avoid-current) |
| 1625 | (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)) | 1626 | "Return a compilation buffer. |
| 1627 | If AVOID-CURRENT is nil, and | ||
| 1628 | the current buffer is a compilation buffer, return it. | ||
| 1629 | If AVOID-CURRENT is non-nil, return the current buffer | ||
| 1630 | only as a last resort." | ||
| 1631 | (if (and (compilation-buffer-internal-p (current-buffer)) | ||
| 1632 | (not avoid-current)) | ||
| 1633 | (current-buffer) | ||
| 1634 | (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))) | ||
| 1626 | 1635 | ||
| 1627 | ;;;###autoload | 1636 | ;;;###autoload |
| 1628 | (defun compilation-next-error-function (n &optional reset) | 1637 | (defun compilation-next-error-function (n &optional reset) |