Mercurial > hg > xemacs-beta
comparison man/lispref/markers.texi @ 1738:f43f9ca6c7d9
[xemacs-hg @ 2003-10-10 12:39:27 by stephent]
@var -> @code <87ad89mfs3.fsf_-_@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Fri, 10 Oct 2003 12:39:45 +0000 |
parents | 576fb035e263 |
children | 9fae6227ede5 |
comparison
equal
deleted
inserted
replaced
1737:68ed93de81b7 | 1738:f43f9ca6c7d9 |
---|---|
506 If the mark is inactive, @code{mark} normally returns @code{nil}. | 506 If the mark is inactive, @code{mark} normally returns @code{nil}. |
507 However, if @var{force} is non-@code{nil}, then @code{mark} returns the | 507 However, if @var{force} is non-@code{nil}, then @code{mark} returns the |
508 mark position anyway---or @code{nil}, if the mark is not yet set for | 508 mark position anyway---or @code{nil}, if the mark is not yet set for |
509 the buffer. | 509 the buffer. |
510 | 510 |
511 (Remember that if @var{zmacs-regions} is @code{nil}, the mark is | 511 (Remember that if @code{zmacs-regions} is @code{nil}, the mark is |
512 always active as long as it exists, and the @var{force} argument | 512 always active as long as it exists, and the @var{force} argument |
513 will have no effect.) | 513 will have no effect.) |
514 | 514 |
515 If you are using this in an editing command, you are most likely making | 515 If you are using this in an editing command, you are most likely making |
516 a mistake; see the documentation of @code{set-mark} below. | 516 a mistake; see the documentation of @code{set-mark} below. |
685 bounds of the region and whether it is active. Few programs need to use | 685 bounds of the region and whether it is active. Few programs need to use |
686 these functions, however. A command designed to operate on a region | 686 these functions, however. A command designed to operate on a region |
687 should normally use @code{interactive} with the @samp{r} specification | 687 should normally use @code{interactive} with the @samp{r} specification |
688 to find the beginning and end of the region. This lets other Lisp | 688 to find the beginning and end of the region. This lets other Lisp |
689 programs specify the bounds explicitly as arguments and automatically | 689 programs specify the bounds explicitly as arguments and automatically |
690 respects the user's setting for @var{zmacs-regions}. (@xref{Interactive | 690 respects the user's setting for @code{zmacs-regions}. |
691 Codes}.) | 691 (@xref{Interactive Codes}.) |
692 | 692 |
693 @defun region-beginning &optional buffer | 693 @defun region-beginning &optional buffer |
694 This function returns the position of the beginning of @var{buffer}'s | 694 This function returns the position of the beginning of @var{buffer}'s |
695 region (as an integer). This is the position of either point or the | 695 region (as an integer). This is the position of either point or the |
696 mark, whichever is smaller. @var{buffer} defaults to the current buffer | 696 mark, whichever is smaller. @var{buffer} defaults to the current buffer |
728 @end defun | 728 @end defun |
729 | 729 |
730 @defvar zmacs-region-stays | 730 @defvar zmacs-region-stays |
731 If a command sets this variable to true, the currently active region | 731 If a command sets this variable to true, the currently active region |
732 will remain activated when the command finishes. (Normally the region is | 732 will remain activated when the command finishes. (Normally the region is |
733 deactivated when each command terminates.) If @var{zmacs-regions} is | 733 deactivated when each command terminates.) If @code{zmacs-regions} is |
734 false, however, this has no effect. Under normal circumstances, you do | 734 false, however, this has no effect. Under normal circumstances, you do |
735 not need to set this; use the interactive specification @samp{_} | 735 not need to set this; use the interactive specification @samp{_} |
736 instead, if you want the region to remain active. | 736 instead, if you want the region to remain active. |
737 @end defvar | 737 @end defvar |
738 | 738 |
739 @defun zmacs-activate-region | 739 @defun zmacs-activate-region |
740 This function activates the region in the current buffer (this is | 740 This function activates the region in the current buffer (this is |
741 equivalent to activating the current buffer's mark). This will normally | 741 equivalent to activating the current buffer's mark). This will normally |
742 also highlight the text in the active region and set | 742 also highlight the text in the active region and set |
743 @var{zmacs-region-stays} to @code{t}. (If @var{zmacs-regions} is false, | 743 @code{zmacs-region-stays} to @code{t}. (If @code{zmacs-regions} is |
744 however, this function has no effect.) | 744 false, however, this function has no effect.) |
745 @end defun | 745 @end defun |
746 | 746 |
747 @defun zmacs-deactivate-region | 747 @defun zmacs-deactivate-region |
748 This function deactivates the region in the current buffer (this is | 748 This function deactivates the region in the current buffer (this is |
749 equivalent to deactivating the current buffer's mark). This will | 749 equivalent to deactivating the current buffer's mark). This will |
750 normally also unhighlight the text in the active region and set | 750 normally also unhighlight the text in the active region and set |
751 @var{zmacs-region-stays} to @code{nil}. (If @var{zmacs-regions} is | 751 @code{zmacs-region-stays} to @code{nil}. (If @code{zmacs-regions} is |
752 false, however, this function has no effect.) | 752 false, however, this function has no effect.) |
753 @end defun | 753 @end defun |
754 | 754 |
755 @defun zmacs-update-region | 755 @defun zmacs-update-region |
756 This function updates the active region, if it's currently active. (If | 756 This function updates the active region, if it's currently active. (If |
766 This normal hook is called when a region becomes active. (Usually this | 766 This normal hook is called when a region becomes active. (Usually this |
767 happens as a result of a command that activates the region, such as | 767 happens as a result of a command that activates the region, such as |
768 @code{set-mark-command}, @code{activate-region}, or | 768 @code{set-mark-command}, @code{activate-region}, or |
769 @code{exchange-point-and-mark}.) Note that calling | 769 @code{exchange-point-and-mark}.) Note that calling |
770 @file{zmacs-activate-region} will call this hook, even if the region is | 770 @file{zmacs-activate-region} will call this hook, even if the region is |
771 already active. If @var{zmacs-regions} is false, however, this hook | 771 already active. If @code{zmacs-regions} is false, however, this hook |
772 will never get called under any circumstances. | 772 will never get called under any circumstances. |
773 @end defvar | 773 @end defvar |
774 | 774 |
775 @defvar zmacs-deactivate-region-hook | 775 @defvar zmacs-deactivate-region-hook |
776 This normal hook is called when an active region becomes inactive. | 776 This normal hook is called when an active region becomes inactive. |
777 (Calling @file{zmacs-deactivate-region} when the region is inactive will | 777 (Calling @file{zmacs-deactivate-region} when the region is inactive will |
778 @emph{not} cause this hook to be called.) If @var{zmacs-regions} is | 778 @emph{not} cause this hook to be called.) If @code{zmacs-regions} is |
779 false, this hook will never get called. | 779 false, this hook will never get called. |
780 @end defvar | 780 @end defvar |
781 | 781 |
782 @defvar zmacs-update-region-hook | 782 @defvar zmacs-update-region-hook |
783 This normal hook is called when an active region is "updated" by | 783 This normal hook is called when an active region is "updated" by |
784 @code{zmacs-update-region}. This normally gets called at the end | 784 @code{zmacs-update-region}. This normally gets called at the end |
785 of each command that sets @var{zmacs-region-stays} to @code{t}, | 785 of each command that sets @code{zmacs-region-stays} to @code{t}, |
786 indicating that the region should remain activated. The motion | 786 indicating that the region should remain activated. The motion |
787 commands do this. | 787 commands do this. |
788 @end defvar | 788 @end defvar |
789 | 789 |
790 | 790 |