/[emacs]/emacs/lisp/progmodes/compile.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/compile.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.385 by jurta, Thu Sep 29 22:57:28 2005 UTC revision 1.386 by rms, Sun Oct 2 03:33:18 2005 UTC
# Line 899  visible rather than the beginning." Line 899  visible rather than the beginning."
899    :group 'compilation)    :group 'compilation)
900    
901    
902  (defun compilation-buffer-name (mode-name name-function)  (defun compilation-buffer-name (mode-name mode-command name-function)
903    "Return the name of a compilation buffer to use.    "Return the name of a compilation buffer to use.
904  If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME  If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME
905  to determine the buffer name.  to determine the buffer name.
906  Likewise if `compilation-buffer-name-function' is non-nil.  Likewise if `compilation-buffer-name-function' is non-nil.
907  If current buffer is in Compilation mode for the same mode name  If current buffer is the mode MODE-COMMAND,
908  return the name of the current buffer, so that it gets reused.  return the name of the current buffer, so that it gets reused.
909  Otherwise, construct a buffer name from MODE-NAME."  Otherwise, construct a buffer name from MODE-NAME."
910    (cond (name-function    (cond (name-function
911           (funcall name-function mode-name))           (funcall name-function mode-name))
912          (compilation-buffer-name-function          (compilation-buffer-name-function
913           (funcall compilation-buffer-name-function mode-name))           (funcall compilation-buffer-name-function mode-name))
914          ((eq major-mode (nth 1 compilation-arguments))          ((and (eq mode-command major-mode)
915                  (eq major-mode (nth 1 compilation-arguments)))
916           (buffer-name))           (buffer-name))
917          (t          (t
918           (concat "*" (downcase mode-name) "*"))))           (concat "*" (downcase mode-name) "*"))))
# Line 960  Returns the compilation buffer created." Line 961  Returns the compilation buffer created."
961      (with-current-buffer      (with-current-buffer
962          (setq outbuf          (setq outbuf
963                (get-buffer-create                (get-buffer-create
964                 (compilation-buffer-name name-of-mode name-function)))                 (compilation-buffer-name name-of-mode mode name-function)))
965        (let ((comp-proc (get-buffer-process (current-buffer))))        (let ((comp-proc (get-buffer-process (current-buffer))))
966          (if comp-proc          (if comp-proc
967              (if (or (not (eq (process-status comp-proc) 'run))              (if (or (not (eq (process-status comp-proc) 'run))
# Line 1552  Use this command in a compilation log bu Line 1553  Use this command in a compilation log bu
1553        (dired-other-window (car (get-text-property (point) 'directory)))        (dired-other-window (car (get-text-property (point) 'directory)))
1554      (push-mark)      (push-mark)
1555      (setq compilation-current-error (point))      (setq compilation-current-error (point))
1556      (next-error 0)))      (next-error-internal))))
1557    
1558  ;; Return a compilation buffer.  ;; Return a compilation buffer.
1559  ;; If the current buffer is a compilation buffer, return it.  ;; If the current buffer is a compilation buffer, return it.

Legend:
Removed from v.1.385  
changed lines
  Added in v.1.386

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26