[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27341: updated patch to fix docstring
From: |
npostavs |
Subject: |
bug#27341: updated patch to fix docstring |
Date: |
Thu, 29 Jun 2017 20:54:02 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) |
Alex Branham <branham@utexas.edu> writes:
> Actually, we need to check (use-region-p) anyway in case the mark
> hasn't been activated yet in the buffer:
Oops, good catch, I hadn't thought of that.
> Subject: [PATCH] eww-search-words prompt for query if region inactive or blank
>
> ---
Could you add a ChangeLog entry to the commit message as described in
CONTRIBUTE, please?
> (defun eww-search-words (&optional beg end)
> "Search the web for the text between BEG and END.
> -See the `eww-search-prefix' variable for the search engine used."
> + If region is active (and not whitespace), search the web for
> + the text between BEG and END. Else, prompt the user for a search
> + string. See the `eww-search-prefix' variable for the search
> + engine used."
Doc strings shouldn't be indented like that, and there should be a
double space between sentences.
> (interactive "r")
> - (eww (buffer-substring beg end)))
> + (if (use-region-p)
> + (let ((region-string (buffer-substring beg end)))
> + (if (not (string-match-p "\\`[ \n\t\r\v\f]*\\'" region-string))
> + (eww region-string)))
> + (eww (read-string "Query: "))))
This silently does nothing if the region is active but just blanks, did
you mean to fallback to querying in that case?
- bug#27341: eww-search-words should prompt if region inactive, Alex Branham, 2017/06/12
- bug#27341: updated patch to fix docstring, Alex Branham, 2017/06/13
- bug#27341: updated patch to fix docstring, npostavs, 2017/06/25
- bug#27341: updated patch to fix docstring, Alex Branham, 2017/06/26
- bug#27341: updated patch to fix docstring, npostavs, 2017/06/26
- bug#27341: updated patch to fix docstring, Alex Branham, 2017/06/27
- bug#27341: updated patch to fix docstring, Alex Branham, 2017/06/27
- bug#27341: updated patch to fix docstring,
npostavs <=
- bug#27341: updated patch to fix docstring, Alex Branham, 2017/06/30
- bug#27341: updated patch to fix docstring, Eli Zaretskii, 2017/06/27