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: adding xref-find-definitions support for cl-defmethods Date: Sun, 09 Aug 2015 08:12:03 -0500 Message-ID: <8637zs1u8s.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439125958 506 80.91.229.3 (9 Aug 2015 13:12:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 13:12:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 09 15:12:27 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 1ZOQOo-00054J-SI for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2015 15:12:27 +0200 Original-Received: from localhost ([::1]:55286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOQOn-0003t2-RK for ged-emacs-devel@m.gmane.org; Sun, 09 Aug 2015 09:12:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOQOk-0003sh-26 for emacs-devel@gnu.org; Sun, 09 Aug 2015 09:12:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOQOg-0003BW-JU for emacs-devel@gnu.org; Sun, 09 Aug 2015 09:12:22 -0400 Original-Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:45484) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZOQOg-000393-Cf for emacs-devel@gnu.org; Sun, 09 Aug 2015 09:12:18 -0400 Original-Received: (qmail 22655 invoked by uid 0); 9 Aug 2015 13:12:15 -0000 Original-Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy7.mail.unifiedlayer.com with SMTP; 9 Aug 2015 13:12:15 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw2 with id 2dC41r0082UdiVW01dC780; Sun, 09 Aug 2015 07:12:13 -0600 X-Authority-Analysis: v=2.1 cv=O9qq4nNW c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=y7kgw_RnJtkA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=uRRa74qj2VoA:10 a=8iYXsE_DWHbFvs6y-ckA:9 Original-Received: from [76.218.37.33] (port=52708 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZOQOU-0002y5-03 for emacs-devel@gnu.org; Sun, 09 Aug 2015 07:12:06 -0600 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 70.40.196.235 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:188638 Archived-At: I'd like xref-find-definitions to show all loaded cl-defmethods, as describe-function does. So I'm adding a function cl-generic--xref-locs to return a list of xref locations, in cl-generic.el. That will be called from elisp--xref-identifier-location for a new 'defgeneric type. Can elisp-mode.el have (require 'cl-generic')? I remember some discussion about limits on what elisp-mode.el can require, related to preloading things. But there's nothing in the header comments about that. If not, should I put cl-generic--xref-locs in elisp-mode (or xref?) On the other hand, there may be other types that could be added to xref-find-definitions, possibly by ELPA packges. So perhaps an alist of (type . loc-function), processed in elisp--xref-find-definitions, would be appropriate. Actually, there's no need for the type symbol; it's only used by elisp--xref-find-definitions and elisp--xref-identifier-location. So that could be eliminated, and the current code restructured around a list of loc-functions, as describe-function is with the hook help-fns-describe-function-functions. -- -- Stephe