From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: force initialization of a datatype? Date: Sat, 7 Nov 2015 18:27:34 +0200 Message-ID: <563E2676.1020109@yandex.ru> References: <86lhadybig.fsf@stephe-leake.org> <563A59BD.6010909@yandex.ru> <86ziyrwdce.fsf@stephe-leake.org> <563C9A02.2030601@yandex.ru> <86egg2waph.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1446913683 10585 80.91.229.3 (7 Nov 2015 16:28:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 16:28:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 07 17:27:58 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 1Zv6LN-0007Zn-VL for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 17:27:58 +0100 Original-Received: from localhost ([::1]:44469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv6LN-00006B-CA for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 11:27:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv6L7-00005s-ET for emacs-devel@gnu.org; Sat, 07 Nov 2015 11:27:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zv6L4-0003l0-1h for emacs-devel@gnu.org; Sat, 07 Nov 2015 11:27:41 -0500 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:38831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv6L3-0003ko-SK for emacs-devel@gnu.org; Sat, 07 Nov 2015 11:27:37 -0500 Original-Received: by wmec201 with SMTP id c201so39817481wme.1 for ; Sat, 07 Nov 2015 08:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=//XV7tNsWIgZHMJ8wzB73T05g6PfYdpDSVU5awZ5iuk=; b=F+PbYD3v6ArCwK3cAu+J1yOnL98UWoKApujjJz2iu4uBkbeu8fP/KKOgQynYXorxSL IPLxDGeQTonpb+iwGzHVkg9tsXbMgyNXTpzPYh+WqB1ddAMvXjrmCarpnFIAJjHGFQSX eufiVisrPH7zKjSnK4p2gHR44dz75tMdyIG3o6Y7ngTw+1Y3/F1Lngi90VIhyxhj3py6 7t4D0dggRrTaEVMKjzKiEkzg1366iTuHrfOwGqtjHPIZ8bomNhJMJuQhJD6nTuIw5JUC QU55oYgP5Pn2CUhA7+8a/eznQuKATiqxzROwVJzh/uOFjvw/JgWRmXAngtFHf1myniFk 5EAg== X-Received: by 10.28.146.139 with SMTP id u133mr16695981wmd.29.1446913657381; Sat, 07 Nov 2015 08:27:37 -0800 (PST) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id 79sm4674366wmf.13.2015.11.07.08.27.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Nov 2015 08:27:36 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 In-Reply-To: <86egg2waph.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::236 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:193545 Archived-At: On 11/07/2015 09:05 AM, Stephen Leake wrote: > I don't follow. > > `elisp-xref-find-def-functions' is a hook that is called from > `elisp--xref-find-definitions'; why should it be in find-func? It would have a different name, of course, and maybe used indirectly through calling some of the find-func functions. But like you mentioned, we already have find-function-regexp-alist. > The only file that currently puts a function on that hook is > cedet/mode-local.el; it adds similar functionality to > `help-fns-describe-function-functions' and `find-function-regexp-alist'. Why can't we reuse the contents of those variables? I think the meat of the code that knows how to find Elisp entities should be in one place. find-func seems to be the natural place for it. And elisp-xref should strive to provide a minimal interface over it, until we come to the conclusion that the info provided by find-func is definitely not rich enough (what we do in that case, it most likely out of scope for Emacs 25). > That code has a FIXME about moving it to > `elisp-xref-find-def-functions'; there is already code in cl-generic > that puts similar functionality on > `help-fns-describe-function-functions' and `find-function-regexp-alist'. What if some new third-party facility adds a relevant element to elisp-xref-find-def-funtcions, but not find-function-regexp-alist? Or vice versa? >> I don't think we should deprecate find-func just yet, and it would >> make sense for M-x find-function to support defstruct functions and >> generics. > > It does; I just tried it on some of the ones defined in > elisp-mode-tests.el. All right, thanks (I haven't checked, actually). My main concern is about the code organization.