aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-08-02 17:40:54 +0000
committerRichard M. Stallman2007-08-02 17:40:54 +0000
commit7d1dad0cbd3123f5eaf6088ec0a91335ac44f60c (patch)
tree002ab74779af46143cd0da86d6d1c3b0ef49917d
parent51f6595da78d04b49bd6602d60dbe65ad367ffa3 (diff)
downloademacs-7d1dad0cbd3123f5eaf6088ec0a91335ac44f60c.tar.gz
emacs-7d1dad0cbd3123f5eaf6088ec0a91335ac44f60c.zip
(compilation-find-buffer): Return current buffer immediately if suitable.
(compile, compilation-buffer-name, compilation-start): Doc fixes.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/progmodes/compile.el31
2 files changed, 28 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66f1618be60..cdb89b36942 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12007-08-02 Richard Stallman <rms@gnu.org>
2
3 * progmodes/compile.el (compilation-find-buffer): Return current
4 buffer immediately if suitable.
5 (compile, compilation-buffer-name, compilation-start): Doc fixes.
6
12007-08-02 Stefan Monnier <monnier@iro.umontreal.ca> 72007-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * vc-bzr.el (vc-bzr-admin-dirstate): Rename from `...-dirname'. 9 * vc-bzr.el (vc-bzr-admin-dirstate): Rename from `...-dirname'.
@@ -10,7 +16,7 @@
10 16
11 * ibuf-ext.el (ibuffer-mark-old-buffers): Docstring fix. 17 * ibuf-ext.el (ibuffer-mark-old-buffers): Docstring fix.
12 18
132007-07-31 Drew Adams <drew.adams@oracle.com> (tiny change) 192007-07-31 Drew Adams <drew.adams@oracle.com>
14 20
15 * cus-edit.el (custom-group-value-create, custom-goto-parent): 21 * cus-edit.el (custom-group-value-create, custom-goto-parent):
16 Fix parent groups link. 22 Fix parent groups link.
@@ -12319,7 +12325,7 @@
12319 (name, size, mode) <define-ibuffer-column>: Add a header-mouse-map 12325 (name, size, mode) <define-ibuffer-column>: Add a header-mouse-map
12320 property. 12326 property.
12321 12327
123222006-04-02 Drew Adams <drew.adams@oracle.com> (tiny change) 123282006-04-02 Drew Adams <drew.adams@oracle.com>
12323 12329
12324 * speedbar.el (speedbar-after-create-hook): Doc fix. 12330 * speedbar.el (speedbar-after-create-hook): Doc fix.
12325 12331
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 13e4e40044b..529194ffa7e 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -888,11 +888,13 @@ non-nil; otherwise uses `compile-command'. With prefix arg, always prompts.
888Additionally, with universal prefix arg, compilation buffer will be in 888Additionally, with universal prefix arg, compilation buffer will be in
889comint mode, i.e. interactive. 889comint mode, i.e. interactive.
890 890
891To run more than one compilation at once, start one and rename 891To run more than one compilation at once, start one then rename
892the \`*compilation*' buffer to some other name with 892the \`*compilation*' buffer to some other name with
893\\[rename-buffer]. Then start the next one. On most systems, 893\\[rename-buffer]. Then _switch buffers_ and start the new compilation.
894termination of the main compilation process kills its 894It will create a new \`*compilation*' buffer.
895subprocesses. 895
896On most systems, termination of the main compilation process
897kills its subprocesses.
896 898
897The name used for the buffer is actually whatever is returned by 899The name used for the buffer is actually whatever is returned by
898the function in `compilation-buffer-name-function', so you can set that 900the function in `compilation-buffer-name-function', so you can set that
@@ -944,7 +946,7 @@ visible rather than the beginning."
944If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME 946If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME
945to determine the buffer name. 947to determine the buffer name.
946Likewise if `compilation-buffer-name-function' is non-nil. 948Likewise if `compilation-buffer-name-function' is non-nil.
947If current buffer is the mode MODE-COMMAND, 949If current buffer has the major mode MODE-COMMAND,
948return the name of the current buffer, so that it gets reused. 950return the name of the current buffer, so that it gets reused.
949Otherwise, construct a buffer name from MODE-NAME." 951Otherwise, construct a buffer name from MODE-NAME."
950 (cond (name-function 952 (cond (name-function
@@ -983,8 +985,11 @@ The rest of the arguments are optional; for them, nil means use the default.
983 985
984MODE is the major mode to set in the compilation buffer. Mode 986MODE is the major mode to set in the compilation buffer. Mode
985may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'. 987may also be t meaning use `compilation-shell-minor-mode' under `comint-mode'.
988
986If NAME-FUNCTION is non-nil, call it with one argument (the mode name) 989If NAME-FUNCTION is non-nil, call it with one argument (the mode name)
987to determine the buffer name. 990to determine the buffer name. Otherwise, the default is to
991reuses the current buffer if it has the proper major mode,
992else use or create a buffer with name based on the major mode.
988 993
989If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight 994If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight
990the matching section of the visited source line; the default is to use the 995the matching section of the visited source line; the default is to use the
@@ -1604,12 +1609,16 @@ Use this command in a compilation log buffer. Sets the mark at point there."
1604 (setq compilation-current-error (point)) 1609 (setq compilation-current-error (point))
1605 (next-error-internal))) 1610 (next-error-internal)))
1606 1611
1607;; Return a compilation buffer.
1608;; If the current buffer is a compilation buffer, return it.
1609;; Otherwise, look for a compilation buffer and signal an error
1610;; if there are none.
1611(defun compilation-find-buffer (&optional avoid-current) 1612(defun compilation-find-buffer (&optional avoid-current)
1612 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)) 1613 "Return a compilation buffer.
1614If AVOID-CURRENT is nil, and
1615the current buffer is a compilation buffer, return it.
1616If AVOID-CURRENT is non-nil, return the current buffer
1617only as a last resort."
1618 (if (and (compilation-buffer-internal-p (current-buffer))
1619 (not avoid-current))
1620 (current-buffer)
1621 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)))
1613 1622
1614;;;###autoload 1623;;;###autoload
1615(defun compilation-next-error-function (n &optional reset) 1624(defun compilation-next-error-function (n &optional reset)