If the input doesn't look like an URL or a domain name, the
word(s) will be searched for via `eww-search-prefix'."
(interactive "sEnter URL or keywords: ")
- (cond ((string-match-p "\\`file:" url))
- (t
- (if (and (= (length (split-string url)) 1)
- (or (> (length (split-string url "\\.")) 1)
- (string-match eww-local-regex url)))
- (progn
- (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
- (setq url (concat "http://" url)))
- ;; some site don't redirect final /
- (when (string= (url-filename (url-generic-parse-url url)) "")
- (setq url (concat url "/"))))
- (setq url (concat eww-search-prefix
- (replace-regexp-in-string " " "+" url))))))
+ (cond ((string-match-p "\\`file://" url))
+ ((string-match-p "\\`ftp://" url)
+ (user-error "FTP is not supported."))
+ (t
+ (if (and (= (length (split-string url)) 1)
+ (or (> (length (split-string url "\\.")) 1)
+ (string-match eww-local-regex url)))
+ (progn
+ (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
+ (setq url (concat "http://" url)))
+ ;; some site don't redirect final /
+ (when (string= (url-filename (url-generic-parse-url url)) "")
+ (setq url (concat url "/"))))
+ (setq url (concat eww-search-prefix
+ (replace-regexp-in-string " " "+" url))))))
(url-retrieve url 'eww-render (list url)))
;;;###autoload (defalias 'browse-web 'eww)
(put-text-property start (point) 'eww-form menu)
(add-face-text-property start (point) 'eww-form-select)
(put-text-property start (point) 'keymap eww-select-map)
+ (unless (= start (point))
+ (put-text-property start (1+ start) 'help-echo "select field"))
(shr-ensure-paragraph))))
(defun eww-select-display (select)