GNU bug report logs -
#4136
23.1; delete-pair
Previous Next
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
Message #15 received at 4136 <at> emacsbugs.donarmstrong.com (full text, mbox):
> `delete-pair' is deleting what it documents -- instead of removing the
> open paren of the following sexp, it deletes the current one. So, if
> the cursor is on some whitespace that precedes an expression, the
> whitespace is deleted, and the open paren is left intact.
This should be fixed with the following patch:
Index: lisp/emacs-lisp/lisp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp.el,v
retrieving revision 1.102
diff -u -r1.102 lisp.el
--- lisp/emacs-lisp/lisp.el 22 Jul 2009 02:45:37 -0000 1.102
+++ lisp/emacs-lisp/lisp.el 13 Aug 2009 23:27:42 -0000
@@ -530,8 +530,12 @@
(defun delete-pair ()
"Delete a pair of characters enclosing the sexp that follows point."
(interactive)
- (save-excursion (forward-sexp 1) (delete-char -1))
- (delete-char 1))
+ (save-excursion
+ (forward-sexp 1)
+ (save-excursion
+ (backward-sexp 1)
+ (delete-char 1))
+ (delete-char -1)))
(defun raise-sexp (&optional arg)
"Raise ARG sexps higher up the tree."
--
Juri Linkov
http://www.jurta.org/emacs/
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.