comparison man/lispref/markers.texi @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents 8de8e3f6228a
children f43f9ca6c7d9
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
1 @c -*-texinfo-*- 1 @c -*-texinfo-*-
2 @c This is part of the XEmacs Lisp Reference Manual. 2 @c This is part of the XEmacs Lisp Reference Manual.
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. 3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
4 @c See the file lispref.texi for copying conditions. 4 @c See the file lispref.texi for copying conditions.
5 @setfilename ../../info/markers.info 5 @setfilename ../../info/markers.info
6 @node Markers, Text, Positions, Top 6 @node Markers, Text, Positions, Top
7 @chapter Markers 7 @chapter Markers
8 @cindex markers 8 @cindex markers
256 @result{} #<marker at 200 in markers.texi> 256 @result{} #<marker at 200 in markers.texi>
257 @end group 257 @end group
258 @end example 258 @end example
259 @end defun 259 @end defun
260 260
261 @defun copy-marker marker-or-integer 261 @defun copy-marker marker-or-integer &optional marker-type
262 If passed a marker as its argument, @code{copy-marker} returns a 262 If passed a marker as its argument, @code{copy-marker} returns a
263 new marker that points to the same place and the same buffer as does 263 new marker that points to the same place and the same buffer as does
264 @var{marker-or-integer}. If passed an integer as its argument, 264 @var{marker-or-integer}. If passed an integer as its argument,
265 @code{copy-marker} returns a new marker that points to position 265 @code{copy-marker} returns a new marker that points to position
266 @var{marker-or-integer} in the current buffer. 266 @var{marker-or-integer} in the current buffer.
269 new marker that points to the beginning of the current buffer. If 269 new marker that points to the beginning of the current buffer. If
270 passed an integer argument greater than the length of the buffer, 270 passed an integer argument greater than the length of the buffer,
271 @code{copy-marker} returns a new marker that points to the end of the 271 @code{copy-marker} returns a new marker that points to the end of the
272 buffer. 272 buffer.
273 273
274 An error is signaled if @var{marker} is neither a marker nor an 274 An error is signaled if @var{marker-or-integer} is neither a marker nor
275 integer. 275 an integer.
276
277 Optional second argument @var{marker-type} specifies the insertion type
278 of the new marker; see @code{marker-insertion-type}.
276 279
277 @example 280 @example
278 @group 281 @group
279 (setq p (point-marker)) 282 (setq p (point-marker))
280 @result{} #<marker at 2139 in markers.texi> 283 @result{} #<marker at 2139 in markers.texi>
397 @defun set-marker marker position &optional buffer 400 @defun set-marker marker position &optional buffer
398 This function moves @var{marker} to @var{position} 401 This function moves @var{marker} to @var{position}
399 in @var{buffer}. If @var{buffer} is not provided, it defaults to 402 in @var{buffer}. If @var{buffer} is not provided, it defaults to
400 the current buffer. 403 the current buffer.
401 404
402 If @var{position} is less than 1, @code{set-marker} moves @var{marker} 405 @var{position} can be a marker, an integer or @code{nil}. If
403 to the beginning of the buffer. If @var{position} is greater than the 406 @var{position} is an integer, @code{set-marker} moves @var{marker} to
404 size of the buffer, @code{set-marker} moves marker to the end of the 407 point before the @var{position}th character in @var{buffer}. If
405 buffer. If @var{position} is @code{nil} or a marker that points 408 @var{position} is @code{nil}, @var{marker} is made to point nowhere.
406 nowhere, then @var{marker} is set to point nowhere. 409 Then it no longer slows down editing in any buffer. If @var{position}
410 is less than 1, @var{marker} is moved to the beginning of @var{buffer}.
411 If @var{position} is greater than the size of @var{buffer}, @var{marker}
412 is moved to the end of @var{buffer}.
407 413
408 The value returned is @var{marker}. 414 The value returned is @var{marker}.
409 415
410 @example 416 @example
411 @group 417 @group
508 514
509 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
510 a mistake; see the documentation of @code{set-mark} below. 516 a mistake; see the documentation of @code{set-mark} below.
511 @end defun 517 @end defun
512 518
513 @defun mark-marker inactive-p buffer 519 @defun mark-marker &optional force buffer
514 This function returns @var{buffer}'s mark. @var{buffer} defaults to the 520 This function returns @var{buffer}'s mark. @var{buffer} defaults to the
515 current buffer if omitted. This is the very marker that records the 521 current buffer if omitted. This is the very marker that records the
516 mark location inside XEmacs, not a copy. Therefore, changing this 522 mark location inside XEmacs, not a copy. Therefore, changing this
517 marker's position will directly affect the position of the mark. Don't 523 marker's position will directly affect the position of the mark. Don't
518 do it unless that is the effect you want. 524 do it unless that is the effect you want.
574 internal use in the Lisp program, store it in a Lisp variable. For 580 internal use in the Lisp program, store it in a Lisp variable. For
575 example: 581 example:
576 582
577 @example 583 @example
578 @group 584 @group
579 (let ((beg (point))) 585 (let ((start (point)))
580 (forward-line 1) 586 (forward-line 1)
581 (delete-region beg (point))). 587 (delete-region start (point))).
582 @end group 588 @end group
583 @end example 589 @end example
584 @end defun 590 @end defun
585 591
586 @deffn Command exchange-point-and-mark &optional dont-activate-region 592 @deffn Command exchange-point-and-mark &optional dont-activate-region
619 marks of the current buffer, most recent first. 625 marks of the current buffer, most recent first.
620 626
621 @example 627 @example
622 @group 628 @group
623 mark-ring 629 mark-ring
624 @result{} (#<marker at 11050 in markers.texi> 630 @result{} (#<marker at 11050 in markers.texi>
625 #<marker at 10832 in markers.texi> 631 #<marker at 10832 in markers.texi>
626 @dots{}) 632 @dots{})
627 @end group 633 @end group
628 @end example 634 @end example
629 @end defvar 635 @end defvar