1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-12 09:28:24 +00:00

* lisp/emacs-lisp/lisp.el (delete-pair): Add optional prefix arg.

(Bug#32896)
This commit is contained in:
Juri Linkov 2018-10-19 02:09:15 +03:00
parent e37825fe2a
commit 7aaf9d8a7d

View File

@ -723,11 +723,13 @@ This command assumes point is not in a string or comment."
(interactive "P")
(insert-pair arg ?\( ?\)))
(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))
(defun delete-pair (&optional arg)
"Delete a pair of characters enclosing ARG sexps following point.
A negative ARG deletes a pair of characters around preceding ARG sexps."
(interactive "p")
(unless arg (setq arg 1))
(save-excursion (forward-sexp arg) (delete-char (if (> arg 0) -1 1)))
(delete-char (if (> arg 0) 1 -1)))
(defun raise-sexp (&optional arg)
"Raise ARG sexps higher up the tree."