From 67b50770c050c55a26cd13b9568b01a80a449885 Mon Sep 17 00:00:00 2001 From: Shuguang Sun Date: Sat, 29 Jun 2019 12:18:59 +0200 Subject: [PATCH] Fix recent change in Tramp * lisp/net/tramp-adb.el: * lisp/net/tramp-archive.el: * lisp/net/tramp-integration.el: Remove superfluous `progn' in `with-eval-after-load'. --- lisp/net/tramp-adb.el | 17 +++++----- lisp/net/tramp-archive.el | 13 ++++---- lisp/net/tramp-integration.el | 59 +++++++++++++++++------------------ 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index c8b9e7ae09c..186b67c6e93 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -1299,15 +1299,14 @@ connection if a previous connection has died for some reason." ;; `connection-local-set-profile-variables' and ;; `connection-local-set-profiles' exists since Emacs 26.1. (with-eval-after-load 'shell - (progn - (tramp-compat-funcall - 'connection-local-set-profile-variables - 'tramp-adb-connection-local-default-profile - tramp-adb-connection-local-default-profile) - (tramp-compat-funcall - 'connection-local-set-profiles - `(:application tramp :protocol ,tramp-adb-method) - 'tramp-adb-connection-local-default-profile))) + (tramp-compat-funcall + 'connection-local-set-profile-variables + 'tramp-adb-connection-local-default-profile + tramp-adb-connection-local-default-profile) + (tramp-compat-funcall + 'connection-local-set-profiles + `(:application tramp :protocol ,tramp-adb-method) + 'tramp-adb-connection-local-default-profile)) (add-hook 'tramp-unload-hook (lambda () diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index b329d4a1b11..82fd327770b 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -373,13 +373,12 @@ pass to the OPERATION." (when url-handler-mode (tramp-register-file-name-handlers)) (with-eval-after-load 'url-handler - (progn - (add-hook 'url-handler-mode-hook #'tramp-register-file-name-handlers) - (add-hook - 'tramp-archive-unload-hook - (lambda () - (remove-hook - 'url-handler-mode-hook #'tramp-register-file-name-handlers))))) + (add-hook 'url-handler-mode-hook #'tramp-register-file-name-handlers) + (add-hook + 'tramp-archive-unload-hook + (lambda () + (remove-hook + 'url-handler-mode-hook #'tramp-register-file-name-handlers)))) ;; File name conversions. diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 5960871ca7a..0c706da1ca1 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -124,17 +124,16 @@ been set up by `rfn-eshadow-setup-minibuffer'." #'identity (butlast (tramp-compat-exec-path)) path-separator))) (with-eval-after-load 'esh-util - (progn - (add-hook 'eshell-mode-hook - #'tramp-eshell-directory-change) - (add-hook 'eshell-directory-change-hook - #'tramp-eshell-directory-change) - (add-hook 'tramp-integration-unload-hook - (lambda () - (remove-hook 'eshell-mode-hook - #'tramp-eshell-directory-change) - (remove-hook 'eshell-directory-change-hook - #'tramp-eshell-directory-change))))) + (add-hook 'eshell-mode-hook + #'tramp-eshell-directory-change) + (add-hook 'eshell-directory-change-hook + #'tramp-eshell-directory-change) + (add-hook 'tramp-integration-unload-hook + (lambda () + (remove-hook 'eshell-mode-hook + #'tramp-eshell-directory-change) + (remove-hook 'eshell-directory-change-hook + #'tramp-eshell-directory-change)))) ;;; Integration of recentf.el: @@ -159,17 +158,16 @@ NAME must be equal to `tramp-current-connection'." (recentf-cleanup)))) (with-eval-after-load 'recentf - (progn - (add-hook 'tramp-cleanup-connection-hook - #'tramp-recentf-cleanup) - (add-hook 'tramp-cleanup-all-connections-hook - #'tramp-recentf-cleanup-all) - (add-hook 'tramp-integration-unload-hook - (lambda () - (remove-hook 'tramp-cleanup-connection-hook - #'tramp-recentf-cleanup) - (remove-hook 'tramp-cleanup-all-connections-hook - #'tramp-recentf-cleanup-all))))) + (add-hook 'tramp-cleanup-connection-hook + #'tramp-recentf-cleanup) + (add-hook 'tramp-cleanup-all-connections-hook + #'tramp-recentf-cleanup-all) + (add-hook 'tramp-integration-unload-hook + (lambda () + (remove-hook 'tramp-cleanup-connection-hook + #'tramp-recentf-cleanup) + (remove-hook 'tramp-cleanup-all-connections-hook + #'tramp-recentf-cleanup-all)))) ;;; Default connection-local variables for Tramp: @@ -181,15 +179,14 @@ NAME must be equal to `tramp-current-connection'." ;; `connection-local-set-profile-variables' and ;; `connection-local-set-profiles' exists since Emacs 26.1. (with-eval-after-load 'shell - (progn - (tramp-compat-funcall - 'connection-local-set-profile-variables - 'tramp-connection-local-default-profile - tramp-connection-local-default-profile) - (tramp-compat-funcall - 'connection-local-set-profiles - `(:application tramp) - 'tramp-connection-local-default-profile))) + (tramp-compat-funcall + 'connection-local-set-profile-variables + 'tramp-connection-local-default-profile + tramp-connection-local-default-profile) + (tramp-compat-funcall + 'connection-local-set-profiles + `(:application tramp) + 'tramp-connection-local-default-profile)) (add-hook 'tramp-unload-hook (lambda () (unload-feature 'tramp-integration 'force))) -- 2.39.2