unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Welsh Duggan <md5i@md5i.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 8033@debbugs.gnu.org
Subject: bug#8033: Not the byte compiler; problem lies deeper
Date: Mon, 14 Feb 2011 17:08:27 -0500	[thread overview]
Message-ID: <87zkpy6zhg.fsf@maru.md5i.com> (raw)
In-Reply-To: <87tyg69tcv.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 14 Feb 2011 16:52:32 -0500")

Chong Yidong <cyd@stupidchicken.com> writes:

> Michael Welsh Duggan <md5i@md5i.com> writes:
>
>> Here is a patch which fixes this problem.
>>
>> *** src/print.c	2011-02-14 15:39:19 +0000
>> --- src/print.c	2011-02-14 20:24:00 +0000
>> ***************
>> *** 1063,1068 ****
>> --- 1063,1070 ----
>>         /* Generate the fewest number of digits that represent the
>>   	 floating point value without losing information.  */
>>         dtoastr (buf, FLOAT_TO_STRING_BUFSIZE, 0, 0, data);
>> +       /* Force a decimal point even if integer */
>> +       width = 1;
>>       }
>>     else			/* oink oink */
>>       {
>
> Thanks, but could you explain why printing the float 1.0 as "1" can
> cause this problem in Gnus?  The code in Gnus passes the actual Lisp
> objects around, so the printer shouldn't be involved.

Because the byte compiler uses something like `print' in order to create
the forms in the elc file, and some "1.0"'s in the
`gnus-buffer-configuration' get rendered as "1" in the elc file.  Hence,
when the .elc file gets loaded instead of the .el file (and why not, it
is more recent), you get the bogus integer value instead of the float
value.

This is also why this issue will not occur for people who have not
bootstrapped, since gnus-win.el has not changed.  It does not get
recompiled, and as a result the elc file left behind by a previous
compile still has the "1.0" values in it.

-- 
Michael Welsh Duggan
(md5i@md5i.com)





  reply	other threads:[~2011-02-14 22:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  5:43 bug#8033: 24.0.50; Number type error in byte compiler Chong Yidong
2011-02-14  6:58 ` bug#8033: Not the byte compiler; problem lies deeper Michael Welsh Duggan
2011-02-14 11:22   ` Michael Welsh Duggan
2011-02-14 20:25     ` Michael Welsh Duggan
2011-02-14 21:52       ` Chong Yidong
2011-02-14 22:08         ` Michael Welsh Duggan [this message]
2011-02-14 22:25           ` Chong Yidong
2011-02-14 22:10         ` Michael Welsh Duggan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkpy6zhg.fsf@maru.md5i.com \
    --to=md5i@md5i.com \
    --cc=8033@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).