From 9f3f7f1ec4fdb7152ec5edd5313924fb3575d44f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 6 Sep 2022 12:24:32 +0200 Subject: Make ffap-file-finder work again * lisp/ffap.el (find-file-at-point): Allow people to set ffap-file-finder again (bug#50279). * lisp/ido.el (ido-everywhere): Add an interstitial to fulfil ffap-file-handler semantics. --- lisp/ido.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/ido.el') diff --git a/lisp/ido.el b/lisp/ido.el index 520513b1d29..1d0082da97c 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1507,15 +1507,18 @@ Removes badly formatted data and ignored directories." (add-hook 'minibuffer-setup-hook #'ido-minibuffer-setup) (add-hook 'choose-completion-string-functions #'ido-choose-completion-string)) +(defun ido--ffap-find-file (file) + (find-file file)) + (define-minor-mode ido-everywhere "Toggle use of Ido for all buffer/file reading." :global t (remove-function read-file-name-function #'ido-read-file-name) (remove-function read-buffer-function #'ido-read-buffer) (when (boundp 'ffap-file-finder) - (remove-function ffap-file-finder #'ido-find-file) + (remove-function ffap-file-finder #'ido--ffap-find-file) (when ido-mode - (add-function :override ffap-file-finder #'ido-find-file))) + (add-function :override ffap-file-finder #'ido--ffap-find-file))) (when ido-everywhere (if (not ido-mode) (ido-mode 'both) -- cgit v1.2.3