comparison doc/lispref/markers.texi @ 98752:1d0213f6230f

(The Mark): Document the `lambda' and `(only . OLD)' values of transient-mark-mode. Document handle-shift-selection.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 15 Oct 2008 16:48:06 +0000
parents 107ccd98fa12
children ef39b163f82b
comparison
equal deleted inserted replaced
98751:a0e705c1e7f7 98752:1d0213f6230f
553 This variable if non-@code{nil} enables Transient Mark mode, in which 553 This variable if non-@code{nil} enables Transient Mark mode, in which
554 every buffer-modifying primitive sets @code{deactivate-mark}. The 554 every buffer-modifying primitive sets @code{deactivate-mark}. The
555 consequence of this is that commands that modify the buffer normally 555 consequence of this is that commands that modify the buffer normally
556 make the mark inactive. 556 make the mark inactive.
557 557
558 Lisp programs can set @code{transient-mark-mode} to @code{only} to 558 Lisp programs can set @code{transient-mark-mode} to non-@code{nil},
559 enable Transient Mark mode for the following command only. During 559 non-@code{t} values to enable Transient Mark mode temporarily. If the
560 that following command, the value of @code{transient-mark-mode} is 560 value is @code{lambda}, Transient Mark Mode is automatically turned
561 @code{identity}. If it is still @code{identity} at the end of the 561 off after any action, such as buffer modification, that would normally
562 command, it changes to @code{nil}. 562 deactivate the mark. If the value is @w{@code{(only . @var{oldval})}},
563 then @code{transient-mark-mode} is set to the value @var{oldval} after
564 any subsequent command that moves point and is not shift-translated
565 (@pxref{Key Sequence Input, shift-translation}), or after any other
566 action 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
566 If this is non-@code{nil}, Lisp programs and the Emacs user can use the 570 If this is non-@code{nil}, Lisp programs and the Emacs user can use the
567 mark even when it is inactive. This option affects the behavior of 571 mark even when it is inactive. This option affects the behavior of
624 The value of this variable is the maximum size of @code{mark-ring}. If 628 The value of this variable is the maximum size of @code{mark-ring}. If
625 more marks than this are pushed onto the @code{mark-ring}, 629 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
634 This function checks whether the current command was invoked via shift
635 translation (@pxref{Key Sequence Input, shift-translation}), and if
636 so, sets the mark and temporarily activates the region, unless the
637 region is already temporarily activated in this way. If the command
638 was invoked without shift translation, or if the optional argument
639 @var{deactivate} is non-nil, the function deactivates the mark. This
640 function is called whenever a command with a @samp{^} character in its
641 @code{interactive} spec (@pxref{Interactive Codes, ^}) is invoked
642 while @code{shift-select-mode} (@pxref{Shift Selection,,, emacs, The
643 GNU 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)
632 650
633 The text between point and the mark is known as @dfn{the region}. 651 The text between point and the mark is known as @dfn{the region}.