From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Compiled file behaves differently than the uncompiled file (Was Re: bug#19582) Date: Wed, 28 Jan 2015 09:42:02 +0100 Message-ID: <87d25zcn51.fsf@fencepost.gnu.org> References: <851tmyah3n.fsf@iznogoud.viz> <87k30q65gp.fsf@vh213601.truman.edu> <85egqy8yaq.fsf@iznogoud.viz> <858uh6zd0m.fsf@iznogoud.viz> <87fvavcy3j.fsf_-_@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422434534 8970 80.91.229.3 (28 Jan 2015 08:42:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 08:42:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jay Belanger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 28 09:42:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YGOCN-0003s5-IW for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2015 09:42:07 +0100 Original-Received: from localhost ([::1]:51930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOCN-0004rM-3B for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2015 03:42:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOCK-0004rB-BA for emacs-devel@gnu.org; Wed, 28 Jan 2015 03:42:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGOCJ-00023a-6d for emacs-devel@gnu.org; Wed, 28 Jan 2015 03:42:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOCJ-00023W-3q for emacs-devel@gnu.org; Wed, 28 Jan 2015 03:42:03 -0500 Original-Received: from localhost ([127.0.0.1]:55028 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOCI-00040E-N1; Wed, 28 Jan 2015 03:42:02 -0500 Original-Received: by lola (Postfix, from userid 1000) id 450A0E07AB; Wed, 28 Jan 2015 09:42:02 +0100 (CET) In-Reply-To: <87fvavcy3j.fsf_-_@gmail.com> (Jay Belanger's message of "Tue, 27 Jan 2015 22:45:20 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181887 Archived-At: Jay Belanger writes: > Wolfgang Jenkner writes: > ... >> In emacs -Q, do `M-x calc' then convert, say 1m, to cm, i.e., >> >> ' 1 m u c c m >> >> This gives `100 cm' on top of the stack (a plain integer scalar). >> >> Next, start another emacs -Q instance, do `M-x calc' and then, before >> anything else, `M-: (load-library "calc-units")'. >> >> Now the same conversion exercise as before gives `100. cm' on the stack >> instead (a calc float). > > The float appears because Calc does units simplifications differently if the > calc-units.elc file is loaded too soon. I'm not sure why. I could > probably narrow the problem down a little more, but not too far since > the problem is in the elc file, not the el file. > > If the calc-units.elc file is loaded when it is supposed to be, the > float doesn't > appear. > If the calc-units.elc file is loaded right away, then the float appears. > If the calc-units.el file is loaded right away, then the float doesn't appear. > > What could cause the elc file to behave differently than the el file? One obvious candidate is (eval-when-compile (require 'calc-alg)) This will _not_ be loaded by calc-unit.elc, but it will be loaded by calc-unit.el. So try loading it before calc-unit.elc and see whether that makes a difference. -- David Kastrup