From: Michael Albinus Date: Wed, 23 Aug 2023 09:00:34 +0000 (+0200) Subject: * lisp/files.el (file-remote-p): Simplify. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4dc0d6c7eb234b3a41064f77990eb73721f5bb6;p=emacs.git * lisp/files.el (file-remote-p): Simplify. --- 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.