]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid deleting closing quotation mark in checkdoc
authorAlex Branham <alex.branham@gmail.com>
Fri, 16 Aug 2019 20:55:27 +0000 (13:55 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 16 Aug 2019 20:55:34 +0000 (13:55 -0700)
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Remove calls to delete-region to avoid deleting final " (bug#26328).

lisp/emacs-lisp/checkdoc.el

index 830743f5f89bbd12620150d27b460ef1204c2fa4..3c69975021562ea9e04d9be0876b8430e28e0651 100644 (file)
@@ -1494,16 +1494,11 @@ may require more formatting")
               (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)