Allow 'file:' protocol for Info-follow-nearest-node.

This commit is contained in:
Vincent Belaïche 2018-06-27 15:18:52 +02:00
parent 513b97c0e9
commit 5924259f15
2 changed files with 8 additions and 2 deletions

View file

@ -84,6 +84,12 @@ work right without some adjustment:
* Changes in Emacs 27.1
---
*** Info browser can follow ``file:'' protocol URL's URL created with
The URL's created by the @url Texinfo command, and followed with the
Info-follow-nearest-node function, can now have 'file:' prototype and
are passed to 'browse-url' function, like were the other Web protocols
(namely ftp, http, and https).
---
** New variable 'xft-ignore-color-fonts'.
Default t means don't try to load color fonts when using Xft, as they

View file

@ -3938,8 +3938,8 @@ If FORK is a string, it is the name to use for the new buffer."
If FORK is non-nil, it is passed to `Info-goto-node'."
(let (node)
(cond
((setq node (Info-get-token (point) "[hf]t?tps?://"
"\\([hf]t?tps?://[^ \t\n\"`({<>})']+\\)"))
((setq node (Info-get-token (point) "\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://"
"\\(\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://[^ \t\n\"`({<>})']+\\)"))
(browse-url node)
(setq node t))
((setq node (Info-get-token (point) "\\*note[ \n\t]+"