emacs-diffs
[Top][All Lists]
Advanced

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

master 7e1cfa2 7/7: * lisp/net/tramp-cache.el: Fix misuse of bound-and-t


From: Stefan Monnier
Subject: master 7e1cfa2 7/7: * lisp/net/tramp-cache.el: Fix misuse of bound-and-true-p
Date: Sun, 7 Mar 2021 19:07:36 -0500 (EST)

branch: master
commit 7e1cfa29c3c3f4566c9f973fb1b0e6a28f3eaf59
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/net/tramp-cache.el: Fix misuse of bound-and-true-p
    
    (tramp-get-file-property, tramp-set-file-property): Check the var's
    value rather than its name.
---
 lisp/net/tramp-cache.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 2b0a4d9..ad8310c 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -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)))



reply via email to

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