]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/net/tramp-cache.el: Fix misuse of bound-and-true-p
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 8 Mar 2021 00:07:27 +0000 (19:07 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 8 Mar 2021 00:07:27 +0000 (19:07 -0500)
(tramp-get-file-property, tramp-set-file-property): Check the var's
value rather than its name.

lisp/net/tramp-cache.el

index 2b0a4d9cd05f6c835e0db8f587db668f78870126..ad8310c5ea52d030e8ee19f2b471f44964aaf817 100644 (file)
@@ -164,7 +164,7 @@ Return DEFAULT if not set."
      file property value remote-file-name-inhibit-cache cache-used cached-at)
     (when (>= tramp-verbose 10)
       (let* ((var (intern (concat "tramp-cache-get-count-" property)))
-            (val (or (numberp (bound-and-true-p var))
+            (val (or (numberp (and (boundp var) (symbol-value var)))
                      (progn
                        (add-hook 'tramp-cache-unload-hook
                                  (lambda () (makunbound var)))
@@ -188,7 +188,7 @@ Return 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 (numberp (bound-and-true-p var))
+            (val (or (numberp (and (boundp var) (symbol-value var)))
                      (progn
                        (add-hook 'tramp-cache-unload-hook
                                  (lambda () (makunbound var)))