mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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.
This commit is contained in:
parent
9c6cacd338
commit
ee5ec64624
1 changed files with 10 additions and 2 deletions
|
|
@ -136,7 +136,11 @@ Returns DEFAULT if not set."
|
|||
(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)) 0)))
|
||||
(val (or (and (boundp var) (symbol-value var))
|
||||
(progn
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda () (makunbound var)))
|
||||
0))))
|
||||
(set var (1+ val))))
|
||||
value))
|
||||
|
||||
|
|
@ -156,7 +160,11 @@ Returns VALUE."
|
|||
(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)) 0)))
|
||||
(val (or (and (boundp var) (symbol-value var))
|
||||
(progn
|
||||
(add-hook 'tramp-unload-hook
|
||||
(lambda () (makunbound var)))
|
||||
0))))
|
||||
(set var (1+ val))))
|
||||
value))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue