Subject: bug#4136: 23.1; delete-pair

From: Juri Linkov <[email-masked]>
Date: Mon, 21 Sep 2020 22:12:29 +0300

> (ert-deftest lisp-delete-pair-quotes-in-text-mode ()
>   "Test \\[delete-pair] against string in Text Mode for #15014."
>   (with-temp-buffer
>     (text-mode)
>     (insert "\"foo\"")
>     (goto-char (point-min))
>     (delete-pair)
>     (should (string-equal "fo\"" (buffer-string)))))
>
> So in text mode, delete-pair just deletes two characters, and that
> doesn't seem helpful.  The patch I reverted made it bug out instead,
> which seems better.

Yes, it's better to bug out than to delete text instead of deleting quotes.

> I think the current thing delete-pair does in text-mode is bad, so I'm
> inclined to re-apply the patch, and announce this as an incompatible
> change in NEWS (and explain how to get the behaviour described above
> back).
>
> Any opinions?

If it's really impossible to delete a pair in text-mode, then better
to signal an error.