aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2008-10-15 16:48:06 +0000
committerEli Zaretskii2008-10-15 16:48:06 +0000
commit16624be86339185c93f36c5bd6a7540c4982f5ce (patch)
tree95a3ff427a7fbab0e2fab078826831a3c0cfdd88
parentee6e73b8d939430ec9647114d84fa79085c81025 (diff)
downloademacs-16624be86339185c93f36c5bd6a7540c4982f5ce.tar.gz
emacs-16624be86339185c93f36c5bd6a7540c4982f5ce.zip
(The Mark): Document the `lambda' and `(only . OLD)' values of
transient-mark-mode. Document handle-shift-selection.
-rw-r--r--doc/lispref/markers.texi28
1 files changed, 23 insertions, 5 deletions
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index 6a02a95e038..c63b383d1ba 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -555,11 +555,15 @@ every buffer-modifying primitive sets @code{deactivate-mark}. The
555consequence of this is that commands that modify the buffer normally 555consequence of this is that commands that modify the buffer normally
556make the mark inactive. 556make the mark inactive.
557 557
558Lisp programs can set @code{transient-mark-mode} to @code{only} to 558Lisp programs can set @code{transient-mark-mode} to non-@code{nil},
559enable Transient Mark mode for the following command only. During 559non-@code{t} values to enable Transient Mark mode temporarily. If the
560that following command, the value of @code{transient-mark-mode} is 560value is @code{lambda}, Transient Mark Mode is automatically turned
561@code{identity}. If it is still @code{identity} at the end of the 561off after any action, such as buffer modification, that would normally
562command, it changes to @code{nil}. 562deactivate the mark. If the value is @w{@code{(only . @var{oldval})}},
563then @code{transient-mark-mode} is set to the value @var{oldval} after
564any subsequent command that moves point and is not shift-translated
565(@pxref{Key Sequence Input, shift-translation}), or after any other
566action that would normally deactivate the mark.
563@end defopt 567@end defopt
564 568
565@defopt mark-even-if-inactive 569@defopt mark-even-if-inactive
@@ -626,6 +630,20 @@ more marks than this are pushed onto the @code{mark-ring},
626@code{push-mark} discards an old mark when it adds a new one. 630@code{push-mark} discards an old mark when it adds a new one.
627@end defopt 631@end defopt
628 632
633@defun handle-shift-selection &optional deactivate
634This function checks whether the current command was invoked via shift
635translation (@pxref{Key Sequence Input, shift-translation}), and if
636so, sets the mark and temporarily activates the region, unless the
637region is already temporarily activated in this way. If the command
638was invoked without shift translation, or if the optional argument
639@var{deactivate} is non-nil, the function deactivates the mark. This
640function is called whenever a command with a @samp{^} character in its
641@code{interactive} spec (@pxref{Interactive Codes, ^}) is invoked
642while @code{shift-select-mode} (@pxref{Shift Selection,,, emacs, The
643GNU Emacs Manual}) is non-@code{nil}.
644
645@end defun
646
629@node The Region 647@node The Region
630@section The Region 648@section The Region
631@cindex region (between point and mark) 649@cindex region (between point and mark)