From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Generalizing find-definition Date: Thu, 11 Dec 2014 19:29:26 -0600 Message-ID: <85k31x4pvt.fsf@stephe-leake.org> References: <20141102151524.0d9c665c@forcix> <85ppc0qf9a.fsf@stephe-leake.org> <85zjb3o09d.fsf@stephe-leake.org> <85tx1amnyg.fsf@stephe-leake.org> <85egsem1u2.fsf@stephe-leake.org> <867fy0or7p.fsf@yandex.ru> <86ppbqn841.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418347811 14689 80.91.229.3 (12 Dec 2014 01:30:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2014 01:30:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 12 02:30:04 2014 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 1XzF3U-00066K-2R for ged-emacs-devel@m.gmane.org; Fri, 12 Dec 2014 02:30:04 +0100 Original-Received: from localhost ([::1]:54966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzF3T-0002F9-JW for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2014 20:30:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzF3J-00028s-9g for emacs-devel@gnu.org; Thu, 11 Dec 2014 20:29:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzF3B-0000V1-HH for emacs-devel@gnu.org; Thu, 11 Dec 2014 20:29:53 -0500 Original-Received: from gproxy5-pub.mail.unifiedlayer.com ([67.222.38.55]:41743) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1XzF3B-0000Rh-9p for emacs-devel@gnu.org; Thu, 11 Dec 2014 20:29:45 -0500 Original-Received: (qmail 1647 invoked by uid 0); 12 Dec 2014 01:29:39 -0000 Original-Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy5.mail.unifiedlayer.com with SMTP; 12 Dec 2014 01:29:39 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw2 with id SRVa1p00u2UdiVW01RVdRu; Thu, 11 Dec 2014 18:29:39 -0700 X-Authority-Analysis: v=2.1 cv=OLu0g0qB c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=fNEgcOh0sVsA:10 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=jrwKn-8xaegA:10 a=A92cGCtB03wA:10 a=bm8s15kUlAdyvPJknLMA:9 Original-Received: from [70.94.38.149] (port=60520 helo=TAKVER) by host114.hostmonster.com with esmtpa (Exim 4.82) (envelope-from ) id 1XzF30-0005sR-Oo for emacs-devel@gnu.org; Thu, 11 Dec 2014 18:29:34 -0700 In-Reply-To: (Stefan Monnier's message of "Thu, 11 Dec 2014 10:07:42 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 70.94.38.149 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.38.55 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:179857 Archived-At: Stefan Monnier writes: > - identifier-at-point should document more clearly that the return value > may be something else than a string. AFAIK the only interesting > non-string non-nil case is to return a special value (e.g. a marker > or just `t' to stand to (point)) which stands for "let the > find-definitions code figure out the identifier at that place". In ada-mode, identifier is a class derived from xref-file-location: (defclass xref-ada-identifier (xref-file-location) ((id :type string :initarg :identifier))) This is because identifiers in Ada are overloaded, and are often just the last part of the fully qualified namespace name. The backend uses the cross-reference information output by the compiler; the compiler does the name resolution. If identifier is restricted to just the string, ada-mode needs a guarantee that xref-find-definitions will be called with current-buffer the same as the buffer containing the string, and point in the same place, so the backend can determine the file, line, column. That seems kludgy. -- -- Stephe