Function: hpath:disable-find-file-urls
hpath:disable-find-file-urls is an interactive and byte-compiled
function defined in hpath.el.
Signature
(hpath:disable-find-file-urls)
Documentation
Disable the use of ftp and www Urls as arguments to find-file commands.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
(defun hpath:disable-find-file-urls ()
"Disable the use of ftp and www Urls as arguments to `find-file' commands."
(interactive)
(when (hpath:find-file-urls-p)
(remove-hook 'file-name-handler-alist
(cons hpath:remote-regexp 'tramp-file-name-handler))
;; www-url functions are defined in "hsys-www.el".
(put 'expand-file-name 'tramp nil)
(put 'find-file-noselect 'tramp nil)
;; Necessary since Dired overrides other file-name-handler-alist
;; settings.
(put 'expand-file-name 'dired nil)
(put 'find-file-noselect 'dired nil)
;; Remove overloaded functions.
(if (fboundp 'hyperb:substitute-in-file-name)
(progn (defalias 'substitute-in-file-name
(symbol-function 'hyperb:substitute-in-file-name))
(fmakunbound 'hyperb:substitute-in-file-name)))
(setq hpath:find-file-urls-mode nil)
(force-mode-line-update)
(if (called-interactively-p 'interactive)
(message
"(hpath:disable-find-file-urls): Find file commands will not accept URLs."))))