Function: eww-search-words

eww-search-words is an autoloaded, interactive and byte-compiled function defined in eww.el.gz.

Signature

(eww-search-words)

Documentation

Search the web for the text in the region.

If region is active (and not whitespace), search the web for the text between region beginning and end. Else, prompt the user for a search string. See the variable eww-search-prefix for the search engine used.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
;;;###autoload
(defun eww-search-words ()
  "Search the web for the text in the region.
If region is active (and not whitespace), search the web for
the text between region beginning and end.  Else, prompt the
user for a search string.  See the variable `eww-search-prefix'
for the search engine used."
  (interactive)
  (if (use-region-p)
      (let ((region-string (buffer-substring (region-beginning) (region-end))))
        (if (not (string-match-p "\\`[ \n\t\r\v\f]*\\'" region-string))
            (eww region-string)
          (call-interactively #'eww)))
    (call-interactively #'eww)))