Handle not bound allow-remote-paths in file-remote-p
authorNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 10 Apr 2020 22:35:40 +0000 (18:35 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Fri, 10 Apr 2020 22:35:40 +0000 (18:35 -0400)
* lisp/files.el(file-remote-p): Use when-boundp instead of
declared-boundp, as it will derefence the variable anyway.

lisp/files.el

index ffa0c42..4b2d8bf 100644 (file)
@@ -3671,7 +3671,7 @@ absolute one."
 ;; Suggested by Michael Kifer <kifer@CS.SunySB.EDU>
 (defun file-remote-p (file-name)
   "Test whether FILE-NAME is looked for on a remote system."
-  (cond ((not (declare-boundp allow-remote-paths)) nil)
+  (cond ((not (when-boundp 'allow-remote-paths allow-remote-paths)) nil)
        ((fboundp 'ange-ftp-ftp-path)
         (declare-fboundp (ange-ftp-ftp-path file-name)))
        ((fboundp 'efs-ftp-path)