branch: master commit bae87d985b75a5ec4c727559cf27ae4734cc7a0d Author: Philippe Vaucher <philippe.vauc...@gmail.com> Commit: Philippe Vaucher <philippe.vauc...@gmail.com>
Don't rely on TRAMP internal functions --- ztree-util.el | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ztree-util.el b/ztree-util.el index 07935b7..39975b0 100644 --- a/ztree-util.el +++ b/ztree-util.el @@ -67,14 +67,7 @@ Used since `car-safe' returns nil for atoms" (defun ztree-untrampify-filename (file) "Return FILE as the local file name." - ;; FIXME: We shouldn't use internal Tramp functions. - (require 'tramp) - (declare-function tramp-tramp-file-p "tramp" (name)) - (declare-function tramp-file-name-localname "tramp" (vec)) - (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) - (if (not (tramp-tramp-file-p file)) - file - (tramp-file-name-localname (tramp-dissect-file-name file)))) + (or (file-remote-p file 'localname) file)) (defun ztree-quotify-string (str) "Surround STR with quotes."