]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/compile.el
merge and fixes
[gnu-emacs] / lisp / progmodes / compile.el
index 5fc4a5f99dfbf4010a0d120221d7e1ef0f7d44a2..7000b4bbc8a94438b701c9b6bc932a596661b67e 100644 (file)
@@ -583,7 +583,6 @@ Otherwise, it saves all modified buffers without asking."
   :type 'boolean
   :group 'compilation)
 
-;;;###autoload
 (defcustom compilation-save-buffers-predicate nil
   "The second argument (PRED) passed to `save-some-buffers' before compiling.
 E.g., one can set this to
@@ -596,7 +595,8 @@ of `my-compilation-root' here."
           (const :tag "Default (save all file-visiting buffers)" nil)
           (const :tag "Save all buffers" t)
           function)
-  :group 'compilation)
+  :group 'compilation
+  :version "24.1")
 
 ;;;###autoload
 (defcustom compilation-search-path '(nil)
@@ -748,9 +748,9 @@ Faces `compilation-error-face', `compilation-warning-face',
   "If non-nil, automatically jump to the next error encountered.")
 (make-variable-buffer-local 'compilation-auto-jump-to-next)
 
-(defvar buffer-modtime nil
+(defvar compilation-buffer-modtime nil
   "The buffer modification time, for buffers not associated with files.")
-(make-variable-buffer-local 'buffer-modtime)
+(make-variable-buffer-local 'compilation-buffer-modtime)
 
 (defvar compilation-skip-to-next-location t
   "*If non-nil, skip multiple error messages for the same source location.")
@@ -1265,7 +1265,8 @@ Returns the compilation buffer created."
             (set (make-local-variable 'compilation-auto-jump-to-next) t))
        ;; Output a mode setter, for saving and later reloading this buffer.
        (insert "-*- mode: " name-of-mode
-               "; default-directory: " (prin1-to-string default-directory)
+               "; default-directory: "
+                (prin1-to-string (abbreviate-file-name default-directory))
                " -*-\n"
                (format "%s started at %s\n\n"
                        mode-name
@@ -1587,7 +1588,7 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see).
        mode-name (or name-of-mode "Compilation"))
   (set (make-local-variable 'page-delimiter)
        compilation-page-delimiter)
-  (set (make-local-variable 'buffer-modtime) nil)
+  (set (make-local-variable 'compilation-buffer-modtime) nil)
   (compilation-setup)
   (setq buffer-read-only t)
   (run-mode-hooks 'compilation-mode-hook))
@@ -1803,7 +1804,7 @@ and runs `compilation-filter-hook'."
               (unless comint-inhibit-carriage-motion
                 (comint-carriage-motion (process-mark proc) (point)))
               (set-marker (process-mark proc) (point))
-              (set (make-local-variable 'buffer-modtime) (current-time))
+              (set (make-local-variable 'compilation-buffer-modtime) (current-time))
               (run-hooks 'compilation-filter-hook))
          (goto-char pos)
           (narrow-to-region min max)
@@ -1977,7 +1978,7 @@ This is the value of `next-error-function' in Compilation buffers."
                  ;; There may be no timestamp info if the loc is a `fake-loc',
                  ;; but we just checked that the file has been visited before!
                  (equal (nth 4 loc)
-                        (setq timestamp buffer-modtime)))
+                        (setq timestamp compilation-buffer-modtime)))
       (with-current-buffer (compilation-find-file marker (caar (nth 2 loc))
                                                  (cadr (car (nth 2 loc))))
        (save-restriction