Function: url-scheme-get-property
url-scheme-get-property is an autoloaded and byte-compiled function
defined in url-methods.el.gz.
Signature
(url-scheme-get-property SCHEME PROPERTY)
Documentation
Get PROPERTY of a URL SCHEME.
Will automatically try to load a backend from url-SCHEME.el if it has not already been loaded.
Source Code
;; Defined in /usr/src/emacs/lisp/url/url-methods.el.gz
(defun url-scheme-get-property (scheme property)
"Get PROPERTY of a URL SCHEME.
Will automatically try to load a backend from url-SCHEME.el if
it has not already been loaded."
(setq scheme (downcase scheme))
(let ((desc (gethash scheme url-scheme-registry)))
(if (not desc)
(let* ((stub (concat "url-" scheme))
(loader (intern stub)))
(condition-case ()
;; url-https.el was merged into url-http because of 8+3
;; filename limitations, so we have to do this dance.
(require (if (equal "https" scheme) 'url-http loader))
(error nil))
(if (fboundp loader)
(progn
;; Found the module to handle <scheme> URLs
(unless url-scheme--registering-proxy
(url-scheme-register-proxy scheme))
(setq desc (list 'name scheme
'loader loader))
(dolist (cell url-scheme-methods)
(let ((symbol (intern-soft (format "%s-%s" stub (car cell))))
(type (cdr cell)))
(if symbol
(pcase type
('function
;; Store the symbol name of a function
(if (fboundp symbol)
(setq desc (plist-put desc (car cell) symbol))))
('variable
;; Store the VALUE of a variable
(if (boundp symbol)
(setq desc (plist-put desc (car cell)
(symbol-value symbol)))))
(_
(error "Malformed url-scheme-methods entry: %S"
cell))))))
(puthash scheme desc url-scheme-registry)))))
(or (plist-get desc property)
(plist-get url-scheme-default-properties property))))