mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Make xwidget-webkit-browse-url slightly more DWIM
* lisp/xwidget.el (xwidget-webkit-browse-url): Prepend "https" to URLs that don't have a protocol (bug#31369).
This commit is contained in:
parent
1da5b3abd5
commit
44d2368ca1
1 changed files with 3 additions and 0 deletions
|
|
@ -92,6 +92,9 @@ Interactively, URL defaults to the string looking like a url around point."
|
|||
(or (featurep 'xwidget-internal)
|
||||
(user-error "Your Emacs was not compiled with xwidgets support"))
|
||||
(when (stringp url)
|
||||
;; If it's a "naked url", just try adding https: to it.
|
||||
(unless (string-match "\\`[A-Za-z]+:" url)
|
||||
(setq url (concat "https://" url)))
|
||||
(if new-session
|
||||
(xwidget-webkit-new-session url)
|
||||
(xwidget-webkit-goto-url url))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue