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
commit20b6ef263fd0664acdb208c02fcacb5f5bae31d7 (patch)
tree4d1a34e47134b7f0db64d5edde0b2c02fe784222 /lisp/emacs-lisp
parentda499044b3e37ac3329dcc5d2d95af68fa0d3901 (diff)
downloademacs-20b6ef263fd0664acdb208c02fcacb5f5bae31d7.tar.gz
(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))