Function: Info-url-for-node
Info-url-for-node is a byte-compiled function defined in info.el.gz.
Signature
(Info-url-for-node NODE)
Documentation
Return a URL for NODE, a node in the GNU Emacs or Elisp manual.
NODE should be a string on the form "(manual)Node". Only emacs and elisp manuals are supported.
Source Code
;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-url-for-node (node)
"Return a URL for NODE, a node in the GNU Emacs or Elisp manual.
NODE should be a string on the form \"(manual)Node\". Only emacs
and elisp manuals are supported."
(unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node)
(error "Invalid node name %s" node))
(let ((manual (match-string 1 node))
(node (match-string 2 node)))
(unless (member manual '("emacs" "elisp"))
(error "Only emacs/elisp manuals are supported"))
;; Encode a bunch of characters the way that makeinfo does.
(setq node
(mapconcat (lambda (ch)
(if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^-
(<= 33 ch 47) ; !"#$%&'()*+,-./
(<= 58 ch 64) ; :;<=>?@
(<= 91 ch 96) ; [\]_`
(<= 123 ch 127)) ; {|}~ DEL
(format "_00%x" ch)
(char-to-string ch)))
node
""))
(concat "https://www.gnu.org/software/emacs/manual/html_node/"
manual "/"
(and (not (equal node "Top"))
(concat
(url-hexify-string (string-replace " " "-" node))
".html")))))