bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27341: updated patch to fix docstring


From: Alex Branham
Subject: bug#27341: updated patch to fix docstring
Date: Fri, 30 Jun 2017 08:25:58 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

On Fri 30 Jun 2017 at 00:54, npostavs@users.sourceforge.net wrote:

> Could you add a ChangeLog entry to the commit message as described in
> CONTRIBUTE, please?

Yes, I have done so. Let me know if it's not right.

>
>>  (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.

Fixed.

>
>>    (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?

Fixed, thanks

Attachment: 0005-Make-eww-search-words-prompt-for-query-if-nothing-se.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]