[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem of marker as position

From: Kenichi Handa
Subject: Re: problem of marker as position
Date: Thu, 20 Nov 2003 20:47:17 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Luc Teirlinck <address@hidden> writes:

> Ken'ichi Handa wrote:
>    I've just noticed that (char-after MARKER) returns a
>    character in the current buffer even if the buffer of MARKER
>    is the different one.  I think all such functions that
>    accept a marker as a position ignores the buffer infomation
>    of the marker.

> To me that is exactly what is _meant_ by using a marker "as a
> position".  A function could also accept a marker "as a buffer", by
> ignoring the position, or "truly as a marker", by using both.

I didn't read this paragraph (int the node Positions) as above.

   Positions are usually represented as integers starting from 1, but
can also be represented as "markers"--special objects that relocate
automatically when text is inserted or deleted so they stay with the
surrounding characters.  See *Note Markers::.

But, as I'm not native English, if your understanding is
natural, I don't insist on adding the extra explanation in

Luc Teirlinck <address@hidden> writes:
> Maybe, if this does need clarifying, it might be better to do it in
> (elisp)Overview of Markers instead of (not in addition to) in
> (elisp)Positions, anyway:
> !   A marker specifies a buffer and a position in that buffer.  The
> ! marker can be used to represent a position in the functions that
> ! require one, just as an integer could be used.  In that case, the
> ! marker's buffer is normally ignored.  Of course, a marker used in this
> ! way usually points to a position in the buffer that the function
> ! operates on, but that is entirely the programmer's responsibility.
> ! @xref{Positions}, for a complete description of positions.
I agree.  I'll leave the decision of adding it or not to
your discretion.

Ken'ichi HANDA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]