GNU bug report logs -
#26328
26.0.50; checkdoc action for join lines drops final "
Previous Next
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
Message #34 received at 26328 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu 15 Aug 2019 at 20:11, Noam Postavsky <npostavs <at> gmail.com> wrote:
> Alex Branham <alex.branham <at> gmail.com> 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
[0001-Avoid-deleting-closing-quotation-mark-in-checkdoc.patch (text/x-patch, inline)]
From b2f2ef1731c28d0f541c7778dd7a49774f59ddb7 Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham <at> gmail.com>
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
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.