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

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

Re: (read (current-buffer)) returns an integer in a buffer full of text?


From: Robert Thorpe
Subject: Re: (read (current-buffer)) returns an integer in a buffer full of text?
Date: 29 Nov 2006 10:46:55 -0800
User-agent: G2/1.0

Kevin Rodgers wrote:
> Robert Thorpe wrote:
> > Sebastian Tennant wrote:
> >> However, why does this happen:
> >>
> >>  (with-temp-buffer
> >>    (insert "586114704")
> >>    (backward-word)
> >>    (read (current-buffer)))
> >>
> >>  => 49243792
> >>
> >> Is there an integer limit relating to symbols somehow?
> >
> > The function "read" will read whatever type it finds.  It will treat
> > 586114704 as an integer.
> >
> > Try the following:-
> > Type 586114704 into scratch and do C-x C-e straight afterwards.
> > The echo area will display 49243792.  This is because there is a limit
> > on integers in Emacs, they are 26-bits long.  This allows you to
> > represent -67108865 to 67108864 I think.
>
> ,----[ C-h v most-positive-fixnum RET ]
> | most-positive-fixnum is a variable defined in `C source code'.
> | Its value is 268435455
> |
> | Documentation:
> | The largest value that is representable in a Lisp integer.
> |
> | [back]
> `----

You must be using a CVS version of Emacs.  My version does not have
that variable and it certainly isn't that high.



reply via email to

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