diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-05-10 11:18:43 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-05-10 11:18:43 -0400 |
commit | e4c8ba6c0589f1ba0ba9993c4f1e9c0821d3ca6c (patch) | |
tree | d360934aa96f088100c3a38acefa69460638d877 /lisp/emacs-lisp/lisp.el | |
parent | df620591e8cd5d2733659e9c43e97779b0cb8ec5 (diff) | |
parent | 09bf4768360dd5b8928f90b0b1437f3f5ee43c41 (diff) | |
download | emacs-e4c8ba6c0589f1ba0ba9993c4f1e9c0821d3ca6c.tar.gz |
Merge branch 'emacs-29'
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 417c218c6d7..4e021f738b6 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -92,12 +92,22 @@ report errors as appropriate for this kind of usage." (forward-sexp (- arg) interactive)) (defun mark-sexp (&optional arg allow-extend) - "Set mark ARG sexps from point. -The place mark goes is the same place \\[forward-sexp] would -move to with the same argument. -Interactively, if this command is repeated -or (in Transient Mark mode) if the mark is active, -it marks the next ARG sexps after the ones already marked. + "Set mark ARG sexps from point or move mark one sexp. +When called from Lisp with ALLOW-EXTEND ommitted or nil, mark is +set ARG sexps from point. +With ARG and ALLOW-EXTEND both non-nil (interactively, with prefix +argument), the place to which mark goes is the same place \\[forward-sexp] +would move to with the same argument; if the mark is active, it moves +ARG sexps from its current position, otherwise it is set ARG sexps +from point. +When invoked interactively without a prefix argument and no active +region, mark moves one sexp forward. +When invoked interactively without a prefix argument, and region +is active, mark moves one sexp away of point (i.e., forward +if mark is at or after point, back if mark is before point), thus +extending the region by one sexp. Since the direction of region +extension depends on the relative position of mark and point, you +can change the direction by \\[exchange-point-and-mark]. This command assumes point is not in a string or comment." (interactive "P\np") (cond ((and allow-extend |