emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 290d0e7 1/2: Stylistic changes in tramp-cache.el


From: Michael Albinus
Subject: [Emacs-diffs] master 290d0e7 1/2: Stylistic changes in tramp-cache.el
Date: Thu, 20 Jul 2017 14:28:39 -0400 (EDT)

branch: master
commit 290d0e733f15135696365be79285bceaaa2067f2
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Stylistic changes in tramp-cache.el
    
    * test/lisp/net/tramp-cache.el (tramp-get-file-property)
    (tramp-set-file-property): Use `bound-and-true-p'.  Add
    counter variables to `tramp-cache-unload-hook'.
---
 lisp/net/tramp-cache.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 7227c9b..a162ab0 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -136,9 +136,9 @@ 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))
+            (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))))
@@ -160,9 +160,9 @@ 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))
+            (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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]