Function: js--js-add-resource-alias
js--js-add-resource-alias is a byte-compiled function defined in
js.el.gz.
Signature
(js--js-add-resource-alias ALIAS PATH)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--js-add-resource-alias (alias path)
(with-js
(let* ((io-service (js-get-service "@mozilla.org/network/io-service;1"
"nsIIOService"))
(res-prot (js! (io-service "getProtocolHandler") "resource"))
(res-prot (js-qi res-prot "nsIResProtocolHandler"))
(path-file (js--make-nsilocalfile path))
(path-uri (js! (io-service "newFileURI") path-file)))
(js! (res-prot "setSubstitution") alias path-uri))))