Next Previous Contents

13. Mark and Spot Functions

13.1 create_line_mark

Synopsis

create_line_mark

Usage

User_Mark create_line_mark (Integer c);

Description

The function create_line_mark returns an object of the type User_Mark. This object contains information regarding the current position and current buffer. The parameter c is used to specify the color to use when the line is displayed.

See Also

create_user_mark, set_color_object

13.2 create_user_mark

Synopsis

create_user_mark

Usage

User_Mark create_user_mark ();

Description

The function create_user_mark returns an object of the type User_Mark. This object contains information regarding the current position and current buffer.

See Also

move_user_mark, goto_user_mark, user_mark_buffer

13.3 dupmark

Synopsis

dupmark

Usage

Integer dupmark ();

Description

This function returns zero if the mark is not set or, if the mark is set, a duplicate of it is pushed onto the mark stack and a non-zero value is returned.

See Also

push_mark, markp, pop_mark

13.4 goto_user_mark

Synopsis

goto_user_mark

Usage

Void goto_user_mark (User_Mark mark);

Description

This function returns to the position of the User Mark mark. Before this function may be called, the current buffer must be the buffer associated with the makr.

See Also

move_user_mark, create_user_mark, user_mark_buffer

13.5 is_user_mark_in_narrow

Synopsis

is_user_mark_in_narrow

Usage

Integer is_user_mark_in_narrow (User_Mark m);

Description

This function returns non-zero if the user mark m refers to a position that is within the current narrow restriction of the current buffer. It returns zero if the mark lies outside the restriction. An error will be generated if m does not represent a mark for the current buffer.

See Also

goto_user_mark, move_user_mark

13.6 is_visible_mark

Synopsis

is_visible_mark

Usage

is_visible_mark ();

Description

This function may be used to test whether or not the mark is a visible mark. A visible mar is one which causes the region defined by it to be highlighted. It returns 1 is the mark is visible, or 0 if the mark is not visible or does not exist.

See Also

markp, push_mark

13.7 markp

Synopsis

markp

Usage

Void markp ();

Description

This function returns a non-zero value if the mark is set; otherwise, it returns zero. If a mark is set, a region is defined.

See Also

push_mark, pop_mark, check_region, push_spot

13.8 move_user_mark

Synopsis

move_user_mark

Usage

Void move_user_mark (User_Mark mark);

Description

This function call takes a previously created User Mark, mark, and moves it to the current position and buffer. This means that if one subsequently calls goto_user_mark with this mark as an argument, the the position will be set to what it is prior to the call to move_user_mark. Note: This function call is not equivalent to simply using

        mark = create_user_mark ();
because independent copies of a User Mark are not created uponn assignment. That is, if one has
        variable mark1, mark2;
        setbuf ("first");
        mark1 = create_user_mark ();
        mark2 = mark1;
        setbuf ("second");
and then calls
        move_user_mark (mark1);
both user marks, mark1 and mark2 will be moved since they refer to the same mark.
See Also

goto_user_mark, create_user_mark, user_mark_buffer

13.9 pop_mark

Synopsis

pop_mark

Usage

pop_mark (Integer g);

Description

pop_mark pops the most recent mark pushed onto the mark stack. If the argument g is non-zero, the editing position will be moved to the location of the mark. However, if g is zero, the editing position will be unchanged.

See Also

push_mark, pop_spot, markp, check_region, goto_user_mark

13.10 pop_spot

Synopsis

pop_spot

Usage

Void pop_spot ();

Description

This function is used after a call to push_spot to return to the editing position at the last call to push_spot in the current buffer.

See Also

push_spot, pop_mark

13.11 push_mark

Synopsis

push_mark

Usage

Void push_mark();

Description

This function marks the current position as the beginning of a region. and pushes other marks onto a stack. A region is defined by this mark and the editing point. The mark is removed from the stack only when the function pop_mark is called. For example,

        define mark_buffer ()
        {
          bob ();
          push_mark ();
          eob ();
        }
marks the entire buffer as a region.
See Also

pop_mark, push_spot, markp, dupmark, check_region

13.12 push_spot

Synopsis

push_spot

Usage

Void push_spot ();

Description

push_spot pushes the location of the current buffer location onto a stack. This function does not set the mark. The function push_mark should be used for that purpose. The spot can be returned to using the function pop_spot. Note: Spots are local to each buffer. It is not possible to call push_spot from one buffer and then subsequently call pop_spot from another buffer to return to the position in the first buffer. For this purpose, one must use user marks instead.

See Also

pop_spot, push_mark, create_user_mark

13.13 user_mark_buffer

Synopsis

user_mark_buffer

Usage

String user_mark_buffer (User_Mark m);

Description

This function returns the name of the buffer associated with the User Mark specified by m.

See Also

goto_user_mark, create_user_mark, move_user_mark, is_user_mark_in_narrow


Next Previous Contents