;; is not sensible to invoke an external browser with it, so here only
;; internal browsers are considered. Therefore, it is advised to put
;; that property also on custom browser functions.
-;; (put 'my-browse-url-in-emacs 'browse-url-browser-kind 'internal)
-;; (put 'my-browse-url-externally 'browse-url-browser-kind 'external)
+;; (function-put 'my-browse-url-in-emacs 'browse-url-browser-kind
+;; 'internal)
+;; (function-put 'my-browse-url-externally 'browse-url-browser-kind
+;; 'external)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code:
(defun browse-url--browser-kind-mailto (url)
(browse-url--browser-kind browse-url-mailto-function url))
-(put 'browse-url--mailto 'browse-url-browser-kind
- #'browse-url--browser-kind-mailto)
+(function-put 'browse-url--mailto 'browse-url-browser-kind
+ #'browse-url--browser-kind-mailto)
(defun browse-url--man (url &rest args)
"Calls `browse-url-man-function' with URL and ARGS."
(defun browse-url--browser-kind-man (url)
(browse-url--browser-kind browse-url-man-function url))
-(put 'browse-url--man 'browse-url-browser-kind
- #'browse-url--browser-kind-man)
+(function-put 'browse-url--man 'browse-url-browser-kind
+ #'browse-url--browser-kind-man)
(defun browse-url--browser (url &rest args)
"Calls `browse-url-browser-function' with URL and ARGS."
(defun browse-url--browser-kind-browser (url)
(browse-url--browser-kind browse-url-browser-function url))
-(put 'browse-url--browser 'browse-url-browser-kind
- #'browse-url--browser-kind-browser)
+(function-put 'browse-url--browser 'browse-url-browser-kind
+ #'browse-url--browser-kind-browser)
(defun browse-url--non-html-file-url-p (url)
"Return non-nil if URL is a file:// URL of a non-HTML file."
(url-unhex-string url)
url)))))
-(put 'browse-url-default-windows-browser 'browse-url-browser-kind
- 'external)
+(function-put 'browse-url-default-windows-browser 'browse-url-browser-kind
+ 'external)
(defun browse-url-default-macosx-browser (url &optional _new-window)
"Invoke the macOS system's default Web browser.
(interactive (browse-url-interactive-arg "URL: "))
(start-process (concat "open " url) nil "open" url))
-(put 'browse-url-default-macosx-browser 'browse-url-browser-kind
- 'external)
+(function-put 'browse-url-default-macosx-browser 'browse-url-browser-kind
+ 'external)
;; --- Netscape ---
(lambda (&rest _ignore) (error "No usable browser found"))))
url args))
-(put 'browse-url-default-browser 'browse-url-browser-kind
- ;; Well, most probably external if we ignore w3.
- 'external)
+(function-put 'browse-url-default-browser 'browse-url-browser-kind
+ ;; Well, most probably external if we ignore w3.
+ 'external)
(defun browse-url-can-use-xdg-open ()
"Return non-nil if the \"xdg-open\" program can be used.
(interactive (browse-url-interactive-arg "URL: "))
(call-process "xdg-open" nil 0 nil url))
-(put 'browse-url-xdg-open 'browse-url-browser-kind 'external)
+(function-put 'browse-url-xdg-open 'browse-url-browser-kind 'external)
;;;###autoload
(defun browse-url-netscape (url &optional new-window)
`(lambda (process change)
(browse-url-netscape-sentinel process ,url)))))
-(put 'browse-url-netscape 'browse-url-browser-kind 'external)
+(function-put 'browse-url-netscape 'browse-url-browser-kind 'external)
(defun browse-url-netscape-sentinel (process url)
"Handle a change to the process communicating with Netscape."
`(lambda (process change)
(browse-url-mozilla-sentinel process ,url)))))
-(put 'browse-url-mozilla 'browse-url-browser-kind 'external)
+(function-put 'browse-url-mozilla 'browse-url-browser-kind 'external)
(defun browse-url-mozilla-sentinel (process url)
"Handle a change to the process communicating with Mozilla."
'("-new-window")))
(list url)))))
-(put 'browse-url-firefox 'browse-url-browser-kind 'external)
+(function-put 'browse-url-firefox 'browse-url-browser-kind 'external)
;;;###autoload
(defun browse-url-chromium (url &optional _new-window)
browse-url-chromium-arguments
(list url)))))
-(put 'browse-url-chromium 'browse-url-browser-kind 'external)
+(function-put 'browse-url-chromium 'browse-url-browser-kind 'external)
(defun browse-url-chrome (url &optional _new-window)
"Ask the Google Chrome WWW browser to load URL.
browse-url-chrome-arguments
(list url)))))
-(put 'browse-url-chrome 'browse-url-browser-kind 'external)
+(function-put 'browse-url-chrome 'browse-url-browser-kind 'external)
;;;###autoload
(defun browse-url-galeon (url &optional new-window)
`(lambda (process change)
(browse-url-galeon-sentinel process ,url)))))
-(put 'browse-url-galeon 'browse-url-browser-kind 'external)
+(function-put 'browse-url-galeon 'browse-url-browser-kind 'external)
(defun browse-url-galeon-sentinel (process url)
"Handle a change to the process communicating with Galeon."
`(lambda (process change)
(browse-url-epiphany-sentinel process ,url)))))
-(put 'browse-url-epiphany 'browse-url-browser-kind 'external)
+(function-put 'browse-url-epiphany 'browse-url-browser-kind 'external)
(defun browse-url-epiphany-sentinel (process url)
"Handle a change to the process communicating with Epiphany."
file-name-handler-alist)))
(if same-window (find-file url) (find-file-other-window url))))
-(put 'browse-url-emacs 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-emacs 'browse-url-browser-kind 'internal)
;;;###autoload
(defun browse-url-gnome-moz (url &optional new-window)
'("--newwin"))
(list "--raise" url))))
-(put 'browse-url-gnome-moz 'browse-url-browser-kind 'external)
+(function-put 'browse-url-gnome-moz 'browse-url-browser-kind 'external)
;; --- Mosaic ---
(append browse-url-mosaic-arguments (list url)))
(message "Starting %s...done" browse-url-mosaic-program))))
-(put 'browse-url-mosaic 'browse-url-browser-kind 'external)
+(function-put 'browse-url-mosaic 'browse-url-browser-kind 'external)
;; --- Mosaic using CCI ---
(process-send-string "browse-url" "disconnect\r\n")
(delete-process "browse-url"))
-(put 'browse-url-cci 'browse-url-browser-kind 'external)
+(function-put 'browse-url-cci 'browse-url-browser-kind 'external)
;; --- Conkeror ---
;;;###autoload
"buffer")
url))))))
-(put 'browse-url-conkeror 'browse-url-browser-kind 'external)
+(function-put 'browse-url-conkeror 'browse-url-browser-kind 'external)
;; --- W3 ---
(w3-fetch-other-window url)
(w3-fetch url)))
-(put 'browse-url-w3 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-w3 'browse-url-browser-kind 'internal)
;;;###autoload
(defun browse-url-w3-gnudoit (url &optional _new-window)
(list (concat "(w3-fetch \"" url "\")")
"(raise-frame)"))))
-(put 'browse-url-w3-gnudoit 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-w3-gnudoit 'browse-url-browser-kind 'internal)
;; --- Lynx in an xterm ---
,@browse-url-xterm-args "-e" ,browse-url-text-browser
,url)))
-(put 'browse-url-text-xterm 'browse-url-browser-kind 'external)
+(function-put 'browse-url-text-xterm 'browse-url-browser-kind 'external)
;; --- Lynx in an Emacs "term" window ---
url
"\r")))))
-(put 'browse-url-text-emacs 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-text-emacs 'browse-url-browser-kind 'internal)
;; --- mailto ---
(unless (bolp)
(insert "\n"))))))))
-(put 'browse-url-mail 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-mail 'browse-url-browser-kind 'internal)
;; --- man ---
((executable-find manual-program) (man url))
(t (woman (replace-regexp-in-string "([[:alnum:]]+)" "" url)))))
-(put 'browse-url-man 'browse-url-browser-kind 'internal)
+(function-put 'browse-url-man 'browse-url-browser-kind 'internal)
;; --- Random browser ---
0 nil
(append browse-url-generic-args (list url))))
-(put 'browse-url-generic 'browse-url-browser-kind 'external)
+(function-put 'browse-url-generic 'browse-url-browser-kind 'external)
;;;###autoload
(defun browse-url-kde (url &optional _new-window)
(apply #'start-process (concat "KDE " url) nil browse-url-kde-program
(append browse-url-kde-args (list url))))
-(put 'browse-url-kde 'browse-url-browser-kind 'external)
+(function-put 'browse-url-kde 'browse-url-browser-kind 'external)
(defun browse-url-elinks-new-window (url)
"Ask the Elinks WWW browser to load URL in a new window."
browse-url-elinks-wrapper
(list "elinks" url)))))
-(put 'browse-url-elinks-new-window 'browse-url-browser-kind 'external)
+(function-put 'browse-url-elinks-new-window 'browse-url-browser-kind
+ 'external)
;;;###autoload
(defun browse-url-elinks (url &optional new-window)
`(lambda (process change)
(browse-url-elinks-sentinel process ,url))))))
-(put 'browse-url-elinks 'browse-url-browser-kind 'external)
+(function-put 'browse-url-elinks 'browse-url-browser-kind 'external)
(defun browse-url-elinks-sentinel (process url)
"Determines if Elinks is running or a new one has to be started."