summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-11-19 22:06:10 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-11-19 22:06:10 +0000
commitf07493e7d06b48ab0621264472c5c17778815c4b (patch)
treeb3de4187f3e9402fe0d3d7d38c2c1a684ecb6866 /lisp/emacs-lisp
parentd3b32bfd6c06350902768deee33a095e5a112fab (diff)
downloademacs-f07493e7d06b48ab0621264472c5c17778815c4b.tar.gz
emacs-f07493e7d06b48ab0621264472c5c17778815c4b.tar.bz2
emacs-f07493e7d06b48ab0621264472c5c17778815c4b.zip
(mark-sexp): Mark more if repeated.
Diffstat (limited to 'lisp/emacs-lisp')
-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))