emacs-diffs
[Top][All Lists]
Advanced

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

master e4dc0d6c7eb 1/3: * lisp/files.el (file-remote-p): Simplify.


From: Michael Albinus
Subject: master e4dc0d6c7eb 1/3: * lisp/files.el (file-remote-p): Simplify.
Date: Wed, 23 Aug 2023 05:02:18 -0400 (EDT)

branch: master
commit e4dc0d6c7eb234b3a41064f77990eb73721f5bb6
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    * lisp/files.el (file-remote-p): Simplify.
---
 lisp/files.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 3466a53d165..1803eb9ed9d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1283,10 +1283,8 @@ Tip: You can use this expansion of remote identifier 
components
      returns a remote file name for file \"/bin/sh\" that has the
      same remote identifier as FILE but expanded; a name such as
      \"/sudo:root@myhost:/bin/sh\"."
-  (let ((handler (find-file-name-handler file 'file-remote-p)))
-    (if handler
-       (funcall handler 'file-remote-p file identification connected)
-      nil)))
+  (when-let ((handler (find-file-name-handler file 'file-remote-p)))
+    (funcall handler 'file-remote-p file identification connected)))
 
 ;; Probably this entire variable should be obsolete now, in favor of
 ;; something Tramp-related (?).  It is not used in many places.



reply via email to

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