Variable: dnd-protocol-alist
dnd-protocol-alist is a customizable variable defined in dnd.el.gz.
Value
(("^file:///" . dnd-open-local-file) ("^file://[^/]" . dnd-open-file)
("^file:/[^/]" . dnd-open-local-file)
("^file:[^/]" . dnd-open-local-file)
("^\\(https?\\|ftp\\|nfs\\)://" . dnd-open-file))
Documentation
The functions to call for different protocols when a drop is made.
This variable is used by dnd-handle-multiple-urls.
The list contains of (REGEXP . FUNCTION) pairs.
The functions shall take two arguments, URL, which is the URL dropped and
ACTION which is the action to be performed for the drop (move, copy, link,
private or ask).
If a function's dnd-multiple-handler property is set, it is provided
a list of each URI dropped instead.
If no match is found here, and the value of browse-url-browser-function
is a pair of (REGEXP . FUNCTION), those regexps are tried for a match.
If no match is found, the URL is inserted as text by calling dnd-insert-text.
The function shall return the action done (move, copy, link or private)
if some action was made, or nil if the URL is ignored.
This variable was added, or its default value changed, in Emacs 30.1.
Source Code
;; Defined in /usr/src/emacs/lisp/dnd.el.gz
;;;###autoload
(defcustom dnd-protocol-alist
'(("^file:///" . dnd-open-local-file) ; XDND format.
("^file://[^/]" . dnd-open-file) ; URL with host
("^file:/[^/]" . dnd-open-local-file) ; Old KDE, Motif, Sun
("^file:[^/]" . dnd-open-local-file) ; MS-Windows
("^\\(https?\\|ftp\\|nfs\\)://" . dnd-open-file))
"The functions to call for different protocols when a drop is made.
This variable is used by `dnd-handle-multiple-urls'.
The list contains of (REGEXP . FUNCTION) pairs.
The functions shall take two arguments, URL, which is the URL dropped and
ACTION which is the action to be performed for the drop (move, copy, link,
private or ask).
If a function's `dnd-multiple-handler' property is set, it is provided
a list of each URI dropped instead.
If no match is found here, and the value of `browse-url-browser-function'
is a pair of (REGEXP . FUNCTION), those regexps are tried for a match.
If no match is found, the URL is inserted as text by calling `dnd-insert-text'.
The function shall return the action done (move, copy, link or private)
if some action was made, or nil if the URL is ignored."
:version "30.1"
:type '(repeat (cons (regexp) (function)))
:group 'dnd)