From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Generalizing find-definition Date: Wed, 19 Nov 2014 23:19:28 -0500 Message-ID: References: <20141102151524.0d9c665c@forcix> <20141117211039.37f03409@forcix> <85oas2g1rq.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416457196 30046 80.91.229.3 (20 Nov 2014 04:19:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 04:19:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 20 05:19:49 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 1XrJDg-0005e8-BB for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 05:19:48 +0100 Original-Received: from localhost ([::1]:33489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJDf-0003dg-SW for ged-emacs-devel@m.gmane.org; Wed, 19 Nov 2014 23:19:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJDU-0003be-Q2 for emacs-devel@gnu.org; Wed, 19 Nov 2014 23:19:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrJDN-0007bJ-A8 for emacs-devel@gnu.org; Wed, 19 Nov 2014 23:19:36 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:42903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrJDN-0007bC-5k for emacs-devel@gnu.org; Wed, 19 Nov 2014 23:19:29 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAK4JSUR024653; Wed, 19 Nov 2014 23:19:28 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 24BD83D01; Wed, 19 Nov 2014 23:19:28 -0500 (EST) In-Reply-To: <85oas2g1rq.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 19 Nov 2014 18:21:29 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5130=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5130> : inlines <1546> : streams <1345465> : uri <1835378> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:177851 Archived-At: >>> +(defvar find-definition-identifier-function nil >> I suggest you collapse those two function variables into one: if called >> with a nil value (or without argument), then just find the definitions >> of "thing at point" and if called with a string, then find the >> definitions of that identifier. > Keeping two variables puts that logic in the front-end, so all the > backends don't have to implement it, and we can change it for everyone > consistently. I think both in the front-end and in many backends, the two cases will share a lot of code, so using a single var will simplify code in the front-end and in many backends as well. Stefan