From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Thoughts on getting correct line numbers in the byte compiler's warning messages Date: Thu, 08 Nov 2018 12:02:01 -0500 Message-ID: References: <20181101175953.GC4504@ACM> <20181105105302.GA10520@ACM> <20181106151143.GB4030@ACM> <20181107170036.GA4934@ACM> <20181107184708.GB4934@ACM> <20181108140843.GB5041@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541696507 8587 195.159.176.226 (8 Nov 2018 17:01:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2018 17:01:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 08 18:01:43 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKngc-000252-QH for ged-emacs-devel@m.gmane.org; Thu, 08 Nov 2018 18:01:42 +0100 Original-Received: from localhost ([::1]:58106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKnii-0003RC-Lf for ged-emacs-devel@m.gmane.org; Thu, 08 Nov 2018 12:03:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKngt-0001aq-QU for emacs-devel@gnu.org; Thu, 08 Nov 2018 12:02:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKngq-0006xj-LH for emacs-devel@gnu.org; Thu, 08 Nov 2018 12:01:59 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKngq-0006r7-5T for emacs-devel@gnu.org; Thu, 08 Nov 2018 12:01:56 -0500 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id wA8H1kaf025596; Thu, 8 Nov 2018 12:01:46 -0500 Original-Received: by lechazo.home (Postfix, from userid 20848) id 606E5687F1; Thu, 8 Nov 2018 12:02:01 -0500 (EST) In-Reply-To: <20181108140843.GB5041@ACM> (Alan Mackenzie's message of "Thu, 8 Nov 2018 14:08:43 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6414=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6414> : inlines <6958> : streams <1803686> : uri <2746334> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:231058 Archived-At: >> >> It's "only" the cconv-convert part of cconv.el that will need changes, >> >> but yes, one way or another it will need to be changed to preserve the >> >> location info. >> > OK. But it's still a challenging job. >> I wouldn't call it challenging: the changes are orthogonal to the actual >> working of cconv, so it will likely make the code messier but >> conceptually there's no significant difficulty. I'm familiar with the >> code and will be happy to help. > Thanks! By the way, am I right in thinking that pcase does its > comparisons using equal? "as if by `equal`", so when comparing against symbols we actually use `eq`. > One thing we'd need to watch out for is using equal, not eq, when we > compare symbols. (eq 'foo #) will surely > be nil, but (equal ....) would be t. Same with member and memq. Indeed. > We'd also need to make sure that the reader's enabling flag for creating > these extended symbols is bound to nil whenever we suspend the byte > compiler to do something else (edebug, for example). Rather than a dynamically-scoped var, it might be a better option to either use a new function `read-with-positions`, or else use an additional argument to `read`. Stefan