GNU bug report logs -
#62892
proposal to extend mark-sexp to go forward and backward on command
Previous Next
Full log
View this message in rfc822 format
> I tried to describe the behavior in the doc string as follows:
>
> (defun mark-sexp (&optional arg allow-extend)
> "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; ARG defaults to 1.
> With ALLOW-EXTEND non-nil (interactively, with prefix argument),
> the place mark goes is the same place \\[forward-sexp] would move
> with the same value of ARG; if the mark is active, it moves ARG
> sexps from its current position, otherwise it is set ARG sexps
> from point; ARG defaults to 1.
> 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."
>
> It is still somewhat complicated and confusing, but at least it's
> accurate, I think.
mark-sexp has a counterpart mark-word that has almost the same
implementation and docstring. So this could be fixed in both places.
This bug report was last modified 2 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.