From e4dc0d6c7eb234b3a41064f77990eb73721f5bb6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 23 Aug 2023 11:00:34 +0200 Subject: [PATCH] * 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. -- 2.39.2