bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4136: 23.1; delete-pair


From: Juri Linkov
Subject: bug#4136: 23.1; delete-pair
Date: Mon, 21 Sep 2020 22:12:29 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> (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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]