Prefer HTTPS to HTTP in thing-at-point

* lisp/thingatpt.el (thing-at-point-url-at-point): Prefer HTTPS to
HTTP.
This commit is contained in:
Stefan Kangas 2023-10-24 01:01:07 +02:00
parent ad47beb823
commit b376580e97

View file

@ -565,9 +565,9 @@ looks like an email address, \"ftp://\" if it starts with
;; If it looks like ftp.example.com. treat it as ftp.
(if (string-match "\\`ftp\\." str)
(setq str (concat "ftp://" str)))
;; If it looks like www.example.com. treat it as http.
;; If it looks like www.example.com. treat it as https.
(if (string-match "\\`www\\." str)
(setq str (concat "http://" str)))
(setq str (concat "https://" str)))
;; Otherwise, it just isn't a URI.
(setq str nil)))
str)))