branch: elpa/helm commit 7176f74a02fe8d1132a8400a5966abaaeb9db4b8 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Revert changes to fix emacs-29 error with tramp-file-name-unify --- helm-files.el | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/helm-files.el b/helm-files.el index 31f72ba850..e8c5999811 100644 --- a/helm-files.el +++ b/helm-files.el @@ -3212,34 +3212,10 @@ debugging purpose." ;; Return PATTERN unchanged. (t pattern)))) -(defun helm-ff--file-accessible-directory-p (path) - ;; Workaround emacs-29 file-error in `tramp-file-name-unify' by - ;; using its emacs-28 version instead. - ;; We should not need it elsewhere than at start of - ;; `helm-find-files-get-candidates' as after this initial call all - ;; paths should be absolute. - (cl-letf (((symbol-function 'tramp-file-name-unify) - (lambda (vec &optional _localname) - (when (tramp-file-name-p vec) - (setq vec (copy-tramp-file-name vec)) - (setf (tramp-file-name-localname vec) nil - (tramp-file-name-hop vec) nil)) - vec))) - (file-accessible-directory-p path))) - -(defvar helm-ff--file-accessible-directory-p-fn - ;; Handle the emacs-27 case, where `tramp-file-name-unify` isn't - ;; defined. - (if (and (fboundp 'tramp-file-name-unify) - (equal (func-arity 'tramp-file-name-unify) '(1 . 2))) - #'helm-ff--file-accessible-directory-p - #'file-accessible-directory-p)) - (defun helm-find-files-get-candidates (&optional require-match) "Create candidate list for `helm-source-find-files'." (let* ((path (helm-ff-set-pattern helm-pattern)) - (dir-p (funcall - helm-ff--file-accessible-directory-p-fn path)) + (dir-p (file-accessible-directory-p path)) basedir invalid-basedir non-essential