summaryrefslogtreecommitdiff
path: root/lisp/progmodes/compile.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r--lisp/progmodes/compile.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 94e4f3c6fa7..614ed7d835d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -953,13 +953,11 @@ Faces `compilation-error-face', `compilation-warning-face',
:type 'boolean
:version "23.1")
-(defvar compilation-auto-jump-to-next nil
+(defvar-local compilation-auto-jump-to-next nil
"If non-nil, automatically jump to the next error encountered.")
-(make-variable-buffer-local 'compilation-auto-jump-to-next)
-;; (defvar compilation-buffer-modtime nil
+;; (defvar-local compilation-buffer-modtime nil
;; "The buffer modification time, for buffers not associated with files.")
-;; (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.")
@@ -1087,13 +1085,12 @@ from a different message."
(:conc-name compilation--message->))
loc type end-loc rule)
-(defvar compilation--previous-directory-cache nil
+(defvar-local compilation--previous-directory-cache nil
"A pair (POS . RES) caching the result of previous directory search.
Basically, this pair says that calling
(previous-single-property-change POS \\='compilation-directory)
returned RES, i.e. there is no change of `compilation-directory' between
POS and RES.")
-(make-variable-buffer-local 'compilation--previous-directory-cache)
(defun compilation--flush-directory-cache (start _end)
(cond
@@ -1600,8 +1597,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
(match-beginning mn) (match-end mn)
'font-lock-face (cadr props)))))))))
-(defvar compilation--parsed -1)
-(make-variable-buffer-local 'compilation--parsed)
+(defvar-local compilation--parsed -1)
(defun compilation--ensure-parse (limit)
"Make sure the text has been parsed up to LIMIT."
@@ -2673,9 +2669,8 @@ This is the value of `next-error-function' in Compilation buffers."
(compilation--loc->marker end-loc))
(setf (compilation--loc->visited loc) t)))
-(defvar compilation-gcpro nil
+(defvar-local compilation-gcpro nil
"Internal variable used to keep some values from being GC'd.")
-(make-variable-buffer-local 'compilation-gcpro)
(defun compilation-fake-loc (marker file &optional line col)
"Preassociate MARKER with FILE.
@@ -3041,7 +3036,12 @@ TRUE-DIRNAME is the `file-truename' of DIRNAME, if given."
;; Get the specified directory from FILE.
(spec-directory
(if (cdr file)
- (file-truename (concat comint-file-name-prefix (cdr file))))))
+ ;; This function is active in `compilation-filter'.
+ ;; There could be problems to call `file-truename'
+ ;; for remote compilation processes.
+ (if (file-remote-p default-directory)
+ (concat comint-file-name-prefix (cdr file))
+ (file-truename (concat comint-file-name-prefix (cdr file)))))))
;; Check for a comint-file-name-prefix and prepend it if appropriate.
;; (This is very useful for compilation-minor-mode in an rlogin-mode