summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r--lisp/emacs-lisp/lisp.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 0cf4f0442dd..ad9218b4068 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -72,10 +72,14 @@ move forward across N balanced expressions."
(defun mark-sexp (&optional arg)
"Set mark ARG sexps from point.
The place mark goes is the same place \\[forward-sexp] would
-move to with the same argument."
+move to with the same argument.
+If this command is repeated, it marks the next ARG sexps after the ones
+already marked."
(interactive "p")
(push-mark
(save-excursion
+ (if (and (eq last-command this-command) (mark t))
+ (goto-char (mark)))
(forward-sexp (or arg 1))
(point))
nil t))