aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-07-20 13:46:52 -0400
committerGlenn Morris2017-07-20 13:46:52 -0400
commitee5ec64624b72fb5c18945949437c6371c76d14c (patch)
tree9a697c6564f1a17929d4f6e7a04399573bc1126d
parent9c6cacd338c90180bc377cae923c716c1dc3d14c (diff)
downloademacs-ee5ec64624b72fb5c18945949437c6371c76d14c.tar.gz
emacs-ee5ec64624b72fb5c18945949437c6371c76d14c.zip
Make tramp unloading handle debug counter variables
* lisp/net/tramp-cache.el (tramp-get-file-property) (tramp-set-file-property): Add counter variables to tramp-unload-hook.
-rw-r--r--lisp/net/tramp-cache.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index ac5a9c45bbd..7227c9bf7cc 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -136,7 +136,11 @@ Returns DEFAULT if not set."
136 (tramp-message key 8 "%s %s %s" file property value) 136 (tramp-message key 8 "%s %s %s" file property value)
137 (when (>= tramp-verbose 10) 137 (when (>= tramp-verbose 10)
138 (let* ((var (intern (concat "tramp-cache-get-count-" property))) 138 (let* ((var (intern (concat "tramp-cache-get-count-" property)))
139 (val (or (and (boundp var) (symbol-value var)) 0))) 139 (val (or (and (boundp var) (symbol-value var))
140 (progn
141 (add-hook 'tramp-unload-hook
142 (lambda () (makunbound var)))
143 0))))
140 (set var (1+ val)))) 144 (set var (1+ val))))
141 value)) 145 value))
142 146
@@ -156,7 +160,11 @@ Returns VALUE."
156 (tramp-message key 8 "%s %s %s" file property value) 160 (tramp-message key 8 "%s %s %s" file property value)
157 (when (>= tramp-verbose 10) 161 (when (>= tramp-verbose 10)
158 (let* ((var (intern (concat "tramp-cache-set-count-" property))) 162 (let* ((var (intern (concat "tramp-cache-set-count-" property)))
159 (val (or (and (boundp var) (symbol-value var)) 0))) 163 (val (or (and (boundp var) (symbol-value var))
164 (progn
165 (add-hook 'tramp-unload-hook
166 (lambda () (makunbound var)))
167 0))))
160 (set var (1+ val)))) 168 (set var (1+ val))))
161 value)) 169 value))
162 170