Subject: bug#26328: 26.0.50; checkdoc action for join lines drops final "

From: Noam Postavsky <[email-masked]>
Date: Fri, 16 Aug 2019 09:42:39 -0400

Alex Branham <[email-masked]> writes:

> On Thu 15 Aug 2019 at 20:11, Noam Postavsky <[email-masked]> wrote:
>
>> Note that the checkdoc-autofix-ask-replace is already replacing the
>> newline with a space (which is kind of a strange behaviour, IMO, but
>> that's how it is currently), so I'm not sure it makes much sense to call
>> delete-indentation after.
>
> Ah, indeed. Starting with this buffer:
>
> (defun foo ()
>   "bla bla
>     bla."
>   )
>
> (defun foo ()
>   "Bla bla
>     bla bla.  More words
>     bla bla bla.")
>
> If we just remove the call to delete-indentation we wind up with:
>
> (defun foo ()
>   "Bla bla bla."
>   )
>
> (defun foo ()
>   "Bla bla bla bla.
> More words bla bla bla.")
>
> So perhaps the we just remove that bit? Updated patch attached.

> +		   (when (checkdoc-autofix-ask-replace
> +		          p (1+ p)
> +		          "1st line not a complete sentence.  Join these lines? "
> +		          " " t)
> +		     (setq msg nil)))))

This is like Lars' suggestion, and using this I get

(defun foo ()
  "Bla bla bla bla.  More words
    bla bla bla.")

for the second case which is incorrect, I think.