Variable: url-handler-mode-hook

url-handler-mode-hook is a customizable variable defined in url-handlers.el.gz.

Value

nil

Documentation

Hook run after entering or leaving url-handler-mode(var)/url-handler-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/url/url-handlers.el.gz
(defvar url-handler-regexp) ; defined below to avoid recursive load (revno:108572)

;;;###autoload
(define-minor-mode url-handler-mode
  ;; Can't use "\\[find-file]" below as it produces "[open]":
  "Handle URLs as if they were file names throughout Emacs.
After switching on this minor mode, Emacs file primitives handle
URLs.  For instance:

  (file-exists-p \"https://www.gnu.org/\")
  => t

and `C-x C-f https://www.gnu.org/ RET' will give you the HTML at
that URL in a buffer."
  :global t :group 'url
  ;; Remove old entry, if any.
  (setq file-name-handler-alist
	(delq (rassq 'url-file-handler file-name-handler-alist)
	      file-name-handler-alist))
  (if url-handler-mode
      (push (cons url-handler-regexp 'url-file-handler)
	    file-name-handler-alist)))