* bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change
@ 2019-06-29 3:49 Shuguang Sun
2019-06-29 8:36 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Shuguang Sun @ 2019-06-29 3:49 UTC (permalink / raw)
To: 36428
[-- Attachment #1.1: Type: text/plain, Size: 227 bytes --]
Hi,
In some recent changes to tramp, the 'eval-after-load' was replaced by 'with-eval-after-load',
however, the unnecessary 'progn' function for the 'eval-after-load' is no removed.
Best Regards,
Shuguang Sun
[-- Attachment #1.2: Type: text/html, Size: 313 bytes --]
[-- Attachment #2: tramp_progn_after_with-eval-after-load.diff --]
[-- Type: application/octet-stream, Size: 5068 bytes --]
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index c8b9e7ae09..186b67c6e9 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1299,15 +1299,14 @@ tramp-adb-connection-local-default-profile
;; `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 b329d4a1b1..82fd327770 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -373,13 +373,12 @@ tramp-archive-file-name-handler
(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))))
\f
;; File name conversions.
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el
index 5960871ca7..0c706da1ca 100644
--- a/lisp/net/tramp-integration.el
+++ b/lisp/net/tramp-integration.el
@@ -124,17 +124,16 @@ tramp-eshell-directory-change
#'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 @@ tramp-recentf-cleanup-all
(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 @@ tramp-connection-local-default-profile
;; `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)))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change
2019-06-29 3:49 bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change Shuguang Sun
@ 2019-06-29 8:36 ` Michael Albinus
2019-06-29 9:55 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2019-06-29 8:36 UTC (permalink / raw)
To: Shuguang Sun; +Cc: 36428
"Shuguang Sun" <shuguang79@qq.com> writes:
> Hi,
Hi,
> In some recent changes to tramp, the 'eval-after-load' was replaced by
> 'with-eval-after-load',
> however, the unnecessary 'progn' function for the 'eval-after-load' is
> no removed.
Thanks, this was an overrsight by me. I'm willing to apply your patch,
but it changes 47 lines; too much for a tiny patch.
However, the real change touches just 10 lines, everything else are just
indentation (white space) changes. So IMHO, the patch could be applied
w/o signed papers.
Eli?
> Best Regards,
> Shuguang Sun
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change
2019-06-29 8:36 ` Michael Albinus
@ 2019-06-29 9:55 ` Eli Zaretskii
2019-06-29 10:23 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-06-29 9:55 UTC (permalink / raw)
To: Michael Albinus; +Cc: shuguang79, 36428
> From: Michael Albinus <michael.albinus@gmx.de>
> Date: Sat, 29 Jun 2019 10:36:41 +0200
> Cc: 36428@debbugs.gnu.org
>
> > In some recent changes to tramp, the 'eval-after-load' was replaced by
> > 'with-eval-after-load',
> > however, the unnecessary 'progn' function for the 'eval-after-load' is
> > no removed.
>
> Thanks, this was an overrsight by me. I'm willing to apply your patch,
> but it changes 47 lines; too much for a tiny patch.
>
> However, the real change touches just 10 lines, everything else are just
> indentation (white space) changes. So IMHO, the patch could be applied
> w/o signed papers.
>
> Eli?
Yes, this needs no legal paperwork.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change
2019-06-29 9:55 ` Eli Zaretskii
@ 2019-06-29 10:23 ` Michael Albinus
0 siblings, 0 replies; 4+ messages in thread
From: Michael Albinus @ 2019-06-29 10:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: shuguang79, 36428-done
Version: 27.1
Eli Zaretskii <eliz@gnu.org> writes:
>> However, the real change touches just 10 lines, everything else are just
>> indentation (white space) changes. So IMHO, the patch could be applied
>> w/o signed papers.
>>
>> Eli?
>
> Yes, this needs no legal paperwork.
Thanks, I've pushed it to master. Closing the bug.
> Thanks.
Best regards, Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-29 10:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-29 3:49 bug#36428: Non-necessary progn afer with-eval-after-load in tramp in recent change Shuguang Sun
2019-06-29 8:36 ` Michael Albinus
2019-06-29 9:55 ` Eli Zaretskii
2019-06-29 10:23 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.