GNU bug report logs - #4136
23.1; delete-pair

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Thu, 13 Aug 2009 06:30:04 UTC

Severity: normal

Tags: fixed, moreinfo

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Barzilay <eli <at> barzilay.org>, 4136 <at> debbugs.gnu.org
Subject: bug#4136: 23.1; delete-pair
Date: Tue, 22 Sep 2020 21:18:23 +0300
>> If it's really impossible to delete a pair in text-mode, then better
>> to signal an error.
>
> OK; I've reapplied the patch and fixed the test, and I'm now re-closing
> this bug report.

Thanks.  Every time I delete a pair of quotes in a long string,
or a pair of parens in a long sexp, it makes me feel uneasy since
I worry whether it deleted the intended characters or not.

How about using the same delay blink-matching-delay that is used
after showing a matching paren, but in this case to show
a character at the other end of the pair with a delay
before deleting it?

This is achievable with this patch:

diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index ac4ba78897..88e1b26af3 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -752,6 +752,8 @@ delete-pair
 				      (if (= (length p) 3) (cdr p) p))
 				    insert-pair-alist))
 	      (error "Not after matching pair"))
+	    (when blink-matching-paren
+	      (sit-for blink-matching-delay))
 	    (delete-char 1)))
 	(delete-char -1))
     (save-excursion
@@ -764,6 +766,8 @@ delete-pair
 				    (if (= (length p) 3) (cdr p) p))
 				  insert-pair-alist))
 	    (error "Not before matching pair"))
+	  (when blink-matching-paren
+	    (sit-for blink-matching-delay))
 	  (delete-char -1)))
       (delete-char 1))))
 




This bug report was last modified 4 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.