diff --git a/emacs/.emacs.d/config/init-built-ins.el b/emacs/.emacs.d/config/init-built-ins.el index 089bfa6..d686d6f 100644 --- a/emacs/.emacs.d/config/init-built-ins.el +++ b/emacs/.emacs.d/config/init-built-ins.el @@ -80,4 +80,19 @@ (browse-url url-or-symbol) (browse-url (format "https://www.google.com/search?q=%s" url-or-symbol))))) +(use-package eww + :straight (:type built-in) + :config + (defun eww-before-advice (&rest args) + (interactive + (let* ((uris (eww-suggested-uris)) + (browser-history (mapcar (lambda (h) (plist-get h :url)) eww-history)) + (suggestions (delete-dups (append uris eww-prompt-history browser-history))) + (current-uri (plist-get eww-data :url))) + (list (completing-read "URL or keywords: " suggestions nil nil current-uri 'eww-prompt-history) + current-prefix-arg)))) + (advice-add 'eww :before #'eww-before-advice) + :general + (normal eww-mode-map "go" #'eww)) + (provide 'init-built-ins)