aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2018-10-19 02:09:15 +0300
committerJuri Linkov2018-10-19 02:09:15 +0300
commit7aaf9d8a7d314224a9a423286ebf289b60640039 (patch)
tree0a78e176c95f6338c33973809ba96fd5be268e34
parente37825fe2a39d07320b508f66568ece67d752d48 (diff)
downloademacs-7aaf9d8a7d314224a9a423286ebf289b60640039.tar.gz
emacs-7aaf9d8a7d314224a9a423286ebf289b60640039.zip
* lisp/emacs-lisp/lisp.el (delete-pair): Add optional prefix arg.
(Bug#32896)
-rw-r--r--lisp/emacs-lisp/lisp.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 5a89923f8fb..3fda1dd6186 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -723,11 +723,13 @@ This command assumes point is not in a string or comment."
723 (interactive "P") 723 (interactive "P")
724 (insert-pair arg ?\( ?\))) 724 (insert-pair arg ?\( ?\)))
725 725
726(defun delete-pair () 726(defun delete-pair (&optional arg)
727 "Delete a pair of characters enclosing the sexp that follows point." 727 "Delete a pair of characters enclosing ARG sexps following point.
728 (interactive) 728A negative ARG deletes a pair of characters around preceding ARG sexps."
729 (save-excursion (forward-sexp 1) (delete-char -1)) 729 (interactive "p")
730 (delete-char 1)) 730 (unless arg (setq arg 1))
731 (save-excursion (forward-sexp arg) (delete-char (if (> arg 0) -1 1)))
732 (delete-char (if (> arg 0) 1 -1)))
731 733
732(defun raise-sexp (&optional arg) 734(defun raise-sexp (&optional arg)
733 "Raise ARG sexps higher up the tree." 735 "Raise ARG sexps higher up the tree."