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: Allow xref to use other than current major-mode Date: Wed, 26 Aug 2015 01:11:28 +0300 Message-ID: <55DCE810.2000600@yandex.ru> References: <86fv37it65.fsf@stephe-leake.org> <55DC5612.9050704@yandex.ru> <867fojidv4.fsf@stephe-leake.org> <55DCA073.8090308@yandex.ru> <86twrngjfz.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 1440541069 812 80.91.229.3 (25 Aug 2015 22:17:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 22:17:49 +0000 (UTC) To: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 26 00:17:44 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 1ZUMXH-0003ie-6H for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2015 00:17:43 +0200 Original-Received: from localhost ([::1]:34923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMXG-0000dx-9H for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 18:17:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMRW-0008H9-Qk for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:11:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUMRR-00037s-QA for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:11:46 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:36371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMRR-000372-Bt for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:11:41 -0400 Original-Received: by wicja10 with SMTP id ja10so27700556wic.1 for ; Tue, 25 Aug 2015 15:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=G/PZutJukaGisq3NnNI5gyvpmg75ZSgtubLiKyodvTc=; b=GJUcIPlFTrAQ+GYB4P0LrFP2GoE5AOAXGt9J+6MjiCeWabTs/tzPuBmTWkmTqOsdsd 4yjCqQPU9zDdsSQZKOktZ8xM7XFUObKedzuv/B1eFwEiUagL8ZhFCxgp0YFJPgIMqveA m/1kPhL1fmAvMmE0F7T9hWxRNYVevzFZ64qJLI7SNLR92K1fR4dMoqjpNlY2w82de/lz crH5TAUc3nBQazRi/PMoceoYAYL6rbMAyCreVu2s3fbb/IZpUR37sRiExcybTJtq3uWV 35rafRTSa48pIL40dQfCrwBPKisA5BCiL5GObN2MTH1x9OFUJKouL04MA8Mj0uNV+o9W f+KA== X-Received: by 10.194.240.6 with SMTP id vw6mr56154525wjc.1.1440540700117; Tue, 25 Aug 2015 15:11:40 -0700 (PDT) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id uo6sm865449wjc.1.2015.08.25.15.11.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Aug 2015 15:11:39 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 In-Reply-To: <86twrngjfz.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:c05::233 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:189180 Archived-At: On 08/26/2015 12:13 AM, Stephen Leake wrote: > Ok. I missed that globalized minor modes are automatically run in every > new buffer created, after the major mode hook. That's equivalent to > putting the mode enable function on after-change-major-hook. Pretty much. > I think it would be clearer to not have major modes set things that a > minor mode will then unset, but I can live with it. Even with the current state of affairs, there's no reason to expect that a given xref backend doesn't require setting all xref variables to its own implementations. And in the future, a minor mode will do (add-hook 'xref-backends 'foo-xref nil maybe-locally)