(delete (info-lookup->mode-cache 'symbol ',mode)
(info-lookup->topic-cache 'symbol))))))))
+;;; Integration of compile.el:
+
+;; Compilation processes use `accept-process-output' such a way that
+;; Tramp's parallel `accept-process-output' blocks. See last part of
+;; Bug#45518. So we don't use ssh ControlMaster options.
+(defun tramp-compile-disable-ssh-controlmaster-options ()
+ "Don't allow ssh ControlMaster while compiling."
+ (setq-local tramp-use-ssh-controlmaster-options nil))
+
+(with-eval-after-load 'compile
+ (add-hook 'compilation-mode-hook
+ #'tramp-compile-disable-ssh-controlmaster-options)
+ (add-hook 'tramp-integration-unload-hook
+ (lambda ()
+ (remove-hook 'compilation-start-hook
+ #'tramp-compile-disable-ssh-controlmaster-options))))
+
;;; Default connection-local variables for Tramp:
;; `connection-local-set-profile-variables' and
;; `connection-local-set-profiles' exists since Emacs 26.1.
(tramp-compat-funcall
'connection-local-set-profiles
- `(:application tramp)
+ '(:application tramp)
'tramp-connection-local-default-system-profile)
(defconst tramp-connection-local-default-shell-variables
(with-eval-after-load 'shell
(tramp-compat-funcall
'connection-local-set-profiles
- `(:application tramp)
+ '(:application tramp)
'tramp-connection-local-default-shell-profile))
(add-hook 'tramp-unload-hook
;; Get the specified directory from FILE.
(spec-directory
(if (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)))))))
+ (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