[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26328: 26.0.50; checkdoc action for join lines drops final "
From: |
Noam Postavsky |
Subject: |
bug#26328: 26.0.50; checkdoc action for join lines drops final " |
Date: |
Sun, 28 Jul 2019 10:05:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) |
>> Suggestion for a fix:
>>
>> modified lisp/emacs-lisp/checkdoc.el
>> @@ -1520,7 +1520,7 @@ checkdoc-this-string-valid-engine
>> ;; They said yes. We have more fill work to do...
>> (goto-char (match-beginning 1))
>> (delete-region (point) (match-end 1))
>> - (insert "\n")
>> + (insert "\"")
>> (setq msg nil))))))
>> (if msg
>> (checkdoc-create-error msg s (save-excursion
>
> The " at the end of the doc string is removed by that `delete-region',
> so it's all a bit confusing. The following patch also fixes the problem
> in this example, but I'm not quite sure what the code is attempting to
> do here.
>
> Anybody familiar with this code?
>
> diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
> index 830743f5f8..7ac557711a 100644
> --- a/lisp/emacs-lisp/checkdoc.el
> +++ b/lisp/emacs-lisp/checkdoc.el
> @@ -1498,12 +1498,7 @@ checkdoc-this-string-valid-engine
> p (1+ p)
> "1st line not a complete sentence. Join these lines? "
> " " t)
> - (progn
> - ;; They said yes. We have more fill work to do...
> - (goto-char (match-beginning 1))
> - (delete-region (point) (match-end 1))
> - (insert "\n")
> - (setq msg nil))))))
> + (setq msg nil)))))
> (if msg
> (checkdoc-create-error msg s (save-excursion
> (goto-char s)
AFAICT, both proposed patches will do the wrong thing for this case:
(defun foo ()
"Bla bla
bla bla. More words
bla bla bla.")