summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2023-08-23 11:00:34 +0200
committerMichael Albinus <michael.albinus@gmx.de>2023-08-23 11:00:34 +0200
commite4dc0d6c7eb234b3a41064f77990eb73721f5bb6 (patch)
tree63142ad5e14a17f23f88ed68da006f3a42022b69 /lisp/files.el
parent26ca3e84e167f975afb4e9e9a838935bfe4a19a7 (diff)
downloademacs-e4dc0d6c7eb234b3a41064f77990eb73721f5bb6.tar.gz
* lisp/files.el (file-remote-p): Simplify.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files 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.