From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#26328: 26.0.50; checkdoc action for join lines drops final " Date: Fri, 16 Aug 2019 08:24:25 -0500 Message-ID: <874l2hdz06.fsf@gmail.com> References: <84y3vkqzmd.fsf@tm6592> <878sslnk5w.fsf@mouse.gnus.org> <8736iquuda.fsf@gmail.com> <877e7eowe2.fsf@gmail.com> <87r25motp4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="193555"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , Marco Wahl , 26328@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 16 15:44:38 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hycWz-000oFr-KL for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Aug 2019 15:44:37 +0200 Original-Received: from localhost ([::1]:56356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hycWy-0001Hk-4T for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Aug 2019 09:44:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36339) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hycE3-00050S-ML for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 09:25:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hycE2-0002Dd-KD for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 09:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hycE2-0002DS-F8 for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 09:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hycE2-0001F8-8g for bug-gnu-emacs@gnu.org; Fri, 16 Aug 2019 09:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Aug 2019 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26328 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 26328-submit@debbugs.gnu.org id=B26328.15659618764735 (code B ref 26328); Fri, 16 Aug 2019 13:25:02 +0000 Original-Received: (at 26328) by debbugs.gnu.org; 16 Aug 2019 13:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:53299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hycDc-0001EJ-1C for submit@debbugs.gnu.org; Fri, 16 Aug 2019 09:24:36 -0400 Original-Received: from mail-ot1-f51.google.com ([209.85.210.51]:42171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hycDZ-0001E3-MR for 26328@debbugs.gnu.org; Fri, 16 Aug 2019 09:24:34 -0400 Original-Received: by mail-ot1-f51.google.com with SMTP id j7so9552188ota.9 for <26328@debbugs.gnu.org>; Fri, 16 Aug 2019 06:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7hAPv0k1IxiturYfiEmfb1WacLHh30/e46wCS2Vjw2k=; b=gG4T8f0PO5eADFAyR5p/g+fPZ6IaqJrUqe3E79mOmCmZJPbZXpa/nvyYptnT80MYQR QCz/+tBiQb9q8IG5PQXeUNH8f3M6m8ZeHRqq86gyE5khudNbE12gVxPxCmcruVtNSmP6 7qmIAySn9OjF1kSFOWs9yEXL28v8BqoCRBW7X9fA7TW3U9kkVEoAyi8W+sXgWLjUDrw+ T/qcWG0fzAI2D7KZeAhTtlmWoGmpsqGXCTVJoaEg+sxDw9ZeT0s/FJqVIkuuS8nwcCwJ RQR1eLKQ3JlckDZHK/jbcHr4vhyYzNKwH76XIXevWyHHT9AOBuxCj7M6MQapoqpdiU8R CQcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7hAPv0k1IxiturYfiEmfb1WacLHh30/e46wCS2Vjw2k=; b=VW1sMm9ASisxOvN+TUp1hyS5qKJ3DX8uHjJkJI9yxNYp6KbYPYH3pRP+YQieLvSMQH 6grY1DMJW6A55FSAF474SpCZ/AG212+/xyIzzDVCLt0exsw0NYYoWtL2jGfxx4iFPEeN D+jp57n0sfPJXGvzAn5R+cuwwzEBWE3vZZPj28G3SA79KLXVXaad1L70m1i9laJ3OCyd 4qb50MdNuOxoyfeuSkerdu6rE0xjABYjxHQtjPbfmR6B8hJ1/ItppFgtI5qJeprY9iad 3aecj6RrYQxybLyAdTgJKLjZaaUolxX8Lf8m+nz3M1ddfg78q0ROvytY3fnftASch2Eh xCfQ== X-Gm-Message-State: APjAAAW1BrG9eqqDpp3ylVn0akZl0TbvhAI7n24qiksHkXQIfkQHAad3 DQxKFSG1YZ6qMZqwHGPiWrju3r4BjZA= X-Google-Smtp-Source: APXvYqwa1JP5ujG6KGd7CKI02lQ05R9tCnkcKOygDgWjWm1YeXCY2yDy7QdjdiMFBYEugZVukc9ebA== X-Received: by 2002:a9d:4e0d:: with SMTP id p13mr504412otf.161.1565961867785; Fri, 16 Aug 2019 06:24:27 -0700 (PDT) Original-Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id j6sm2000707otq.16.2019.08.16.06.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Aug 2019 06:24:26 -0700 (PDT) In-Reply-To: <87r25motp4.fsf@gmail.com> (Noam Postavsky's message of "Thu, 15 Aug 2019 20:11:19 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165204 Archived-At: --=-=-= Content-Type: text/plain On Thu 15 Aug 2019 at 20:11, Noam Postavsky wrote: > Alex Branham writes: > > 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. Alex --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Avoid-deleting-closing-quotation-mark-in-checkdoc.patch >From b2f2ef1731c28d0f541c7778dd7a49774f59ddb7 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 16 Aug 2019 08:22:23 -0500 Subject: [PATCH] Avoid deleting closing quotation mark in checkdoc * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Remove calls to delete-region (bug#26328). --- lisp/emacs-lisp/checkdoc.el | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 830743f5f8..3c69975021 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1494,16 +1494,11 @@ checkdoc-this-string-valid-engine (if (and (re-search-forward "[.!?:\"]\\([ \t\n]+\\|\"\\)" (line-end-position) t) (< (current-column) numc)) - (if (checkdoc-autofix-ask-replace - 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)))))) + (when (checkdoc-autofix-ask-replace + p (1+ p) + "1st line not a complete sentence. Join these lines? " + " " t) + (setq msg nil))))) (if msg (checkdoc-create-error msg s (save-excursion (goto-char s) -- 2.22.0 --=-=-=--