Function: dnd-handle-one-url
dnd-handle-one-url is a byte-compiled function defined in dnd.el.gz.
Signature
(dnd-handle-one-url WINDOW ACTION URL)
Documentation
Handle one dropped url by calling the appropriate handler.
The handler is first located by looking at dnd-protocol-alist.
If no match is found here, browse-url-handlers and
browse-url-default-handlers are searched for a match.
If no match is found, just call dnd-insert-text. WINDOW is
where the drop happened, ACTION is the action for the drop, URL
is what has been dropped. Returns ACTION.
Source Code
;; Defined in /usr/src/emacs/lisp/dnd.el.gz
(defun dnd-handle-one-url (window action url)
"Handle one dropped url by calling the appropriate handler.
The handler is first located by looking at `dnd-protocol-alist'.
If no match is found here, `browse-url-handlers' and
`browse-url-default-handlers' are searched for a match.
If no match is found, just call `dnd-insert-text'. WINDOW is
where the drop happened, ACTION is the action for the drop, URL
is what has been dropped. Returns ACTION."
(let (ret)
(or
(catch 'done
(dolist (bf dnd-protocol-alist)
(when (string-match (car bf) url)
(setq ret (funcall (cdr bf) url action))
(throw 'done t)))
nil)
(catch 'done
(let ((browser (browse-url-select-handler url 'internal)))
(when browser
(setq ret 'private)
(funcall browser url action)
(throw 'done t)))
nil)
(progn
(dnd-insert-text window action url)
(setq ret 'private)))
ret))