(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-get-count-" property)))
- (val (or (and (boundp var) (symbol-value var))
+ (val (or (bound-and-true-p var)
(progn
- (add-hook 'tramp-unload-hook
+ (add-hook 'tramp-cache-unload-hook
(lambda () (makunbound var)))
0))))
(set var (1+ val))))
(tramp-message key 8 "%s %s %s" file property value)
(when (>= tramp-verbose 10)
(let* ((var (intern (concat "tramp-cache-set-count-" property)))
- (val (or (and (boundp var) (symbol-value var))
+ (val (or (bound-and-true-p var)
(progn
- (add-hook 'tramp-unload-hook
+ (add-hook 'tramp-cache-unload-hook
(lambda () (makunbound var)))
0))))
(set var (1+ val))))