branch: externals/dtache
commit 69b001d0e5763fbf3817d117e192d95774c1690d
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Make eshell-preoutput-filter-functions local
Make sure that the variable is local before adding dtache
filters. This way we don't effect other eshell buffers if dtache is
not used there.
---
dtache-eshell.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dtache-eshell.el b/dtache-eshell.el
index b36663388a..3f2a7232d0 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -104,13 +104,13 @@ If prefix-argument directly DETACH from the session."
:lighter "dtache-eshell"
:keymap (let ((map (make-sparse-keymap)))
map)
- (with-connection-local-variables
- (if dtache-eshell-mode
- (progn
- (add-hook 'eshell-preoutput-filter-functions
#'dtache--dtache-env-message-filter)
- (add-hook 'eshell-preoutput-filter-functions
#'dtache--dtach-eof-message-filter))
- (remove-hook 'eshell-preoutput-filter-functions
#'dtache--dtache-env-message-filter)
- (remove-hook 'eshell-preoutput-filter-functions
#'dtache--dtach-eof-message-filter))))
+ (make-local-variable 'eshell-preoutput-filter-functions)
+ (if dtache-eshell-mode
+ (progn
+ (add-hook 'eshell-preoutput-filter-functions
#'dtache--dtache-env-message-filter)
+ (add-hook 'eshell-preoutput-filter-functions
#'dtache--dtach-eof-message-filter))
+ (remove-hook 'eshell-preoutput-filter-functions
#'dtache--dtache-env-message-filter)
+ (remove-hook 'eshell-preoutput-filter-functions
#'dtache--dtach-eof-message-filter)))
(provide 'dtache-eshell)