From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#40185: #40185: 28.0.50; Emacs Calc selection of a sub-formula doesn't highlight it Date: Mon, 23 Mar 2020 21:37:40 +0100 Message-ID: <7F26B461-ABA9-4E84-9DB0-6F9B6832EA28@acm.org> References: <0529AD07-A021-4A81-A5A3-EDB9F9465315@acm.org> <875zeuhovo.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40185-done@debbugs.gnu.org To: Narendra Joshi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 23 21:38:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGTpt-000EVI-37 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Mar 2020 21:38:13 +0100 Original-Received: from localhost ([::1]:39552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGTps-0001oD-5g for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Mar 2020 16:38:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59047) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGTpj-0001ns-T6 for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 16:38:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGTpi-0003BL-UE for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 16:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGTpi-0003BE-Jo for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 16:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGTpi-0006Z1-HB for bug-gnu-emacs@gnu.org; Mon, 23 Mar 2020 16:38:02 -0400 Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Mar 2020 20:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 40185 X-GNU-PR-Package: emacs Mail-Followup-To: 40185@debbugs.gnu.org, mattiase@acm.org, narendraj9@gmail.com Original-Received: via spool by 40185-done@debbugs.gnu.org id=D40185.158499587325211 (code D ref 40185); Mon, 23 Mar 2020 20:38:02 +0000 Original-Received: (at 40185-done) by debbugs.gnu.org; 23 Mar 2020 20:37:53 +0000 Original-Received: from localhost ([127.0.0.1]:53605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGTpZ-0006YZ-1l for submit@debbugs.gnu.org; Mon, 23 Mar 2020 16:37:53 -0400 Original-Received: from mail1438c50.megamailservers.eu ([91.136.14.38]:38886 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jGTpW-0006YL-MW for 40185-done@debbugs.gnu.org; Mon, 23 Mar 2020 16:37:51 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1584995864; bh=CC9H27Kn+7NDxNiO8HQ76BOZ06lFphfwS4M4SX6fJwc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=T9rVmt+be3tKI66UyvDZMwXxKFK5iVB9MKFX571rGsL3vWOhUasomScwEquLDcV9r 9dkME1Ssw2N0a9fD9vvTvMRYcy5wqUNi4dj2Q2oR0HV3KwJqPpBpFXhaxW5gvjTBPA ZTWVvtHc/4H36cS0Rnv185SDsHXvtem6gQ0G91z8= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 02NKbfn3031154; Mon, 23 Mar 2020 20:37:43 +0000 In-Reply-To: <875zeuhovo.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A782F18.5E791DF6.001E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=oQIiyUlBDTcA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=t9qDhwy-pJSX3iIKUaAA:9 a=CjuIK1q_8ugA:10 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:177661 Archived-At: 23 mars 2020 kl. 20.06 skrev Narendra Joshi : > Can you please help me > understand what exactly the issue was and how declaring the variable > fixed it? I see that it is `defvar`ed in `calc-ext.el`. 'defvar' without an initial value is a declaration scoped to the = surrounding lexical scope (or file, if at top level). It appears that = calc.el does not require calc-ext, so that math-comp-selected was = assumed to be lexical where it was bound in math-format-stack-value. = This caused it to have the wrong number further down the call tree (in = math-comp-to-string-flat, I think). In Emacs 26 and earlier, calc.el used dynamic binding. Thanks for verifying! Patch pushed to emacs-27.