GNU bug report logs - #26328
26.0.50; checkdoc action for join lines drops final "

Previous Next

Package: emacs;

Reported by: Marco Wahl <marcowahlsoft <at> gmail.com>

Date: Sat, 1 Apr 2017 08:53:01 UTC

Severity: normal

Tags: confirmed, fixed, patch

Found in version 26.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marco Wahl <marcowahlsoft <at> gmail.com>
Cc: 26328 <at> debbugs.gnu.org
Subject: bug#26328: 26.0.50; checkdoc action for join lines drops final "
Date: Fri, 26 Jul 2019 12:51:23 +0200
Marco Wahl <marcowahlsoft <at> gmail.com> writes:

> Checkdoc drops the final " when the action to join the lines has been
> choosen.
>
> E.g. have checkdoc enabled and eval
>
>     (defun foo ()
>     "bla bla
>     bla."
>     )
>
> 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)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.