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

[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: Fri, 16 Aug 2019 09:42:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt)

Alex Branham <address@hidden> writes:

> On Thu 15 Aug 2019 at 20:11, Noam Postavsky <address@hidden> 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.





reply via email to

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