unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Marco Wahl <marcowahlsoft@gmail.com>
Cc: 26328@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	[thread overview]
Message-ID: <878sslnk5w.fsf@mouse.gnus.org> (raw)
In-Reply-To: <84y3vkqzmd.fsf@tm6592> (Marco Wahl's message of "Sat, 01 Apr 2017 10:51:54 +0200")

Marco Wahl <marcowahlsoft@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





  reply	other threads:[~2019-07-26 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  8:51 bug#26328: 26.0.50; checkdoc action for join lines drops final " Marco Wahl
2019-07-26 10:51 ` Lars Ingebrigtsen [this message]
2019-07-28 14:05   ` Noam Postavsky
2019-07-29 11:09     ` Lars Ingebrigtsen
2019-08-15 23:13       ` Alex Branham
2019-08-15 23:18         ` Lars Ingebrigtsen
2019-08-16  0:11         ` Noam Postavsky
2019-08-16 13:24           ` Alex Branham
2019-08-16 13:42             ` Noam Postavsky
2019-08-16 13:55               ` Alex Branham
2019-08-16 14:01                 ` Noam Postavsky
2019-08-16 20:54             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sslnk5w.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=26328@debbugs.gnu.org \
    --cc=marcowahlsoft@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).