(require 'cl-seq) ; for cl-reduce (defcustom eww-suggest-uris '((lambda () (list (get-text-property (point) 'shr-url) (get-text-property (point) 'image-url))) 'url-get-url-at-point (lambda () (plist-get eww-data :url))) "List of functions called to form the list of default URIs for `eww'. Each of the elements is a function returning either a string or a list of strings. The results will be joined into a single list with duplicate entries (if any) removed." :version "25.1" :group 'eww :type 'hook) (defun eww-suggested-uris nil "Return the list of URIs to suggest at the `eww' prompt. This list can be customized via `eww-suggest-uris'." (let ((obseen (make-vector 42 0))) (cl-reduce (lambda (acc elt) (let ((uri (funcall elt))) (if (or (not acc) (intern-soft uri obseen)) acc (intern uri obseen) (cons uri acc)))) eww-suggest-uris :initial-value nil)))