From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Generalizing find-definition Date: Fri, 19 Dec 2014 09:49:43 +0100 Message-ID: References: <20141102151524.0d9c665c@forcix> <86ppbqn841.fsf@yandex.ru> <86mw6o3k28.fsf@yandex.ru> <548F5B60.8050509@yandex.ru> <548F5FFD.5010703@yandex.ru> <548F66B3.3050103@yandex.ru> <54901FEB.1090704@yandex.ru> <5490962D.7010105@yandex.ru> <5490A6B5.7020308@yandex.ru> <86ioh8ax2b.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418979022 27100 80.91.229.3 (19 Dec 2014 08:50:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 08:50:22 +0000 (UTC) Cc: emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 19 09:50:16 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 1Y1tGI-0000EB-Kk for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2014 09:50:14 +0100 Original-Received: from localhost ([::1]:57333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tGH-0006m2-On for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2014 03:50:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tFz-0006ey-5n for emacs-devel@gnu.org; Fri, 19 Dec 2014 03:50:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1tFt-0003Bt-73 for emacs-devel@gnu.org; Fri, 19 Dec 2014 03:49:55 -0500 Original-Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:59591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tFt-0003Bm-09 for emacs-devel@gnu.org; Fri, 19 Dec 2014 03:49:49 -0500 Original-Received: by mail-wg0-f53.google.com with SMTP id l18so682609wgh.26 for ; Fri, 19 Dec 2014 00:49:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Z6itxA9vkefaLxkzSwTuzCAnkateMZy1z3cKJ1awTKo=; b=T+z4WsKmwtoUVpo4Lh1URtpvvTGqhUfGQKNqK0nLBsMcsSo4InAdCjbbyAUM/LX7hG +N13Wjbm0fPuHVX8OzBhPrOvszS1bXrFITKVaKVyf2fr/KtXqLT+mG4/WjmsxIduUzBG q5gdRZPPGFwZ53Ak9UV0zBQGTBUKuGpmX9NYTh8nXhFZ4O1dJES55oenSMwZ4bWA7HCy nRO+PJSrWP6M6K57bazxld4LXmbmzQ8sUaal/m+uILtWZmvdxT0HLu29o0/u+fhW9m/T z9OZtAImMktNnRrbZgdAR54eiUiVHhlfRQAMtrYwGzFyLzmA9uWV/NjBUEeMm5wvhr7u 77eA== X-Received: by 10.180.103.38 with SMTP id ft6mr3625138wib.19.1418978987824; Fri, 19 Dec 2014 00:49:47 -0800 (PST) Original-Received: from ix ([212.46.169.144]) by mx.google.com with ESMTPSA id u9sm11880904wjy.37.2014.12.19.00.49.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Dec 2014 00:49:46 -0800 (PST) Original-Received: from helmut by ix with local (Exim 4.80) (envelope-from ) id 1Y1tFn-00054p-NF; Fri, 19 Dec 2014 09:49:44 +0100 In-Reply-To: <86ioh8ax2b.fsf@yandex.ru> (Dmitry Gutov's message of "Fri, 19 Dec 2014 10:00:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::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:180317 Archived-At: On Fri, Dec 19 2014, Dmitry Gutov wrote: > I've pushed the patch with some updates to > http://git.savannah.gnu.org/cgit/emacs.git/log/?h=scratch/xref, please > everyone take a look. xref-goto-xref should be rewritten as: (defun xref-goto-xref () "Jump to the xref at point and close the xref buffer." (interactive) (let ((loc (xref--location-at-point))) (quit-window) (xref--pop-to-location loc))) as the old version could quit the wrong window. I would also add this to make the next-error command work: (defun xref--next-error-function (n reset?) (when reset? (goto-char (point-min))) (let ((backward (< n 0)) (n (abs n)) (loc nil)) (dotimes (_ n) (setq loc (xref--search-property 'xref-location backward))) (cond (loc (xref--display-position (point) t 0) (xref--pop-to-location loc)) (t (error "No %s xref" (if backward "previous" "next")))))) (define-derived-mode xref--xref-buffer-mode fundamental-mode "XREF" "Mode for displaying cross refenences." (setq buffer-read-only t) (setq next-error-function #'xref--next-error-function) (setq next-error-last-buffer (current-buffer))) Helmut