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: xref overrides user xref-backend-functions Date: Tue, 01 Dec 2015 17:41:59 -0600 Message-ID: <86vb8hohx4.fsf@stephe-leake.org> References: <864mg2u22p.fsf@stephe-leake.org> <565DFE5C.4090209@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1449013369 12826 80.91.229.3 (1 Dec 2015 23:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2015 23:42:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 02 00:42:39 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 1a3uZC-0004wL-JC for ged-emacs-devel@m.gmane.org; Wed, 02 Dec 2015 00:42:38 +0100 Original-Received: from localhost ([::1]:55399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3uZB-0002EW-Ih for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2015 18:42:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3uZ8-0002EO-5U for emacs-devel@gnu.org; Tue, 01 Dec 2015 18:42:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3uZ3-0000qA-20 for emacs-devel@gnu.org; Tue, 01 Dec 2015 18:42:34 -0500 Original-Received: from gproxy2-pub.mail.unifiedlayer.com ([69.89.18.3]:49110) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1a3uZ2-0000p7-RF for emacs-devel@gnu.org; Tue, 01 Dec 2015 18:42:28 -0500 Original-Received: (qmail 14122 invoked by uid 0); 1 Dec 2015 23:42:19 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy2.mail.unifiedlayer.com with SMTP; 1 Dec 2015 23:42:19 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw4 with id oPiD1r00e2UdiVW01PiGLR; Tue, 01 Dec 2015 16:42:19 -0700 X-Authority-Analysis: v=2.1 cv=IekUBwaa 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=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=wUQvQvOEmiQA:10 a=vaJtXVxTAAAA:8 a=6REFP32XRRO1ndPp-noA:9 Original-Received: from [76.218.37.33] (port=51846 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1a3uYn-0001nu-0I; Tue, 01 Dec 2015 16:42:13 -0700 In-Reply-To: <565DFE5C.4090209@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Dec 2015 22:09:00 +0200") 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: 69.89.18.3 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:195725 Archived-At: Dmitry Gutov writes: > On 12/01/2015 08:15 AM, Stephen Leake wrote: > >> (progn >> (setq xref-backend-functions (lambda () 'my-xref-backend)) >> (require 'xref) >> xref-backend-functions) > > I don't think we've ever discussed being able to override the backend > from the init file like that. Yes, we did settle on a globalized minor mode. That's what I'm actually doing. Ah; the code that defines the minor mode does not have "(require 'xref)"; it should. Then this issue is moot. > How about this, though? > > diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el > index 8a69b07..cddb017 100644 > --- a/lisp/progmodes/xref.el > +++ b/lisp/progmodes/xref.el > @@ -210,7 +210,7 @@ xref-backend-functions > > ;; We make the etags backend the default for now, until something > ;; better comes along. > -(add-hook 'xref-backend-functions #'etags--xref-backend) > +(add-hook 'xref-backend-functions #'etags--xref-backend t) So etags--xref-backend is appended rather than prepended. That's a little better, but I'd prefer to have complete control. I think (require 'xref) is acceptable. -- -- Stephe