help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: A possible marker bug in emacs 20.4


From: Bingham, Jay
Subject: RE: A possible marker bug in emacs 20.4
Date: Thu, 8 Mar 2001 11:46:37 -0800

Ehud,

Thanks for clearing up some of my misconceptions.  I think that I would not
have had those misconceptions if the examples in the reference manual used
`point-marker' instead of literal numbers.
I still have questions that I think should be answered if not by you then by
someone who knows what is going on.  
If as you say `point' returns an integer while `point-marker' returns a
marker:
1.      Why does my marker variable get updated as described when I assign
an integer to my marker variable from the eval prompt?
2.      Why does the marker start-loc get updated as described when I put
(setq start-loc 30) in my function rather than (setq start-loc (point)),
since they are both technically integers?
It appears to me that there must be something different or special about the
way elisp handles either the literal integer or the integer returned by
(point).  Because in one case the type of 'start-loc' is not changed from
'marker' to something else and in the other case it appears that it is.  I
looked in the 'reference' and found nothing in the description of the point
function that indicates that it causes side effects.  All it says is that it
returns an integer.  The description of the marker clearly indicates by the
examples in it that integers are acceptable arguments for setting markers.
There is not indication that what I have done to set may marker does not
work.

It may be that the way it is working is the way it was designed to work.  If
that is the case then the documentation is, in my opinion, deficient and
should be enhanced.

-_
J_)
C_)ingham
Compaq Telecommunications
Austin, TX


        -----Original Message-----
        From:   Ehud Karni [mailto:ehud@unix.simonwiesel.co.il]
        Sent:   Wednesday, March 07, 2001 12:21 PM
        To:     Bingham, Jay
        Cc:     G Annamalai; help-gnu-emacs@gnu.org
        Subject:        Re: A possible marker bug in emacs 20.4

        ...

        Here is your mistake, `point' returns a number, `point-marker'
returns a
        marker. The `setq' command REPLACES the (void) marker by a number.
        The above should be:
              (setq start-loc (point-marker))
        ...
        -- 
         @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance
agency
             @    @      @  @@  @   Tel: +972-3-6212-757    Fax:
+972-3-6292-544
             @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:
1-815-5509341
             @    @ @    @ @    @        Better     Safe     Than     Sorry
         http://www.simonwiesel.co.il    mailto:ehud@unix.simonwiesel.co.il



reply via email to

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