From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master fe939b3 1/2: Fix reference to `tags-loop-continue' in doc string Date: Fri, 02 Aug 2019 14:23:15 +0200 Message-ID: References: <20190801195403.16246.49802@vcs0.savannah.gnu.org> <20190801195406.087AF20CC8@vcs0.savannah.gnu.org> <87ef23allc.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67560"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 02 14:23:54 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htWbB-000HTl-E4 for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2019 14:23:53 +0200 Original-Received: from localhost ([::1]:34334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htWbA-0002Si-4i for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2019 08:23:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36948) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htWaf-0002SZ-HR for emacs-devel@gnu.org; Fri, 02 Aug 2019 08:23:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htWae-0007fF-GW for emacs-devel@gnu.org; Fri, 02 Aug 2019 08:23:21 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:36718) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htWae-0007dI-88 for emacs-devel@gnu.org; Fri, 02 Aug 2019 08:23:20 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id g67so62049593wme.1 for ; Fri, 02 Aug 2019 05:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=ZiL5nSvgcdJEXMBhwN37qkZ2IYdx0JTQqWcoPh6Sbj8=; b=PpjQg7j7/EIjye0QmjaIVNeqzbcwBw3DpbuaYql1JdMjni5gbEdXJRmetMC6QBtBIx VnRwiB911hKBJndNCbWOHgXxj8Qkyk8GDZs8huKQGcI+IDBDM/4I+UrMKZ4XYZREifqo aBaDXh5nDQ6StNo1eUCUhfT9apfj1RbJqausRl83pncQKNKYJ73e1ecV3ewQDu/QStDr 34zH5PtrfRioCfD5n1EUfS68w39etg9sKJ60h6qZzFqMpg8naU6Js41KmRSnNextA719 /7k7jFZb4AAzvUToIgskqeInA7K4Re80G1v6j0uPxBy8K9J3GBeVcuzT1IND2jXDpZRT nVCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=ZiL5nSvgcdJEXMBhwN37qkZ2IYdx0JTQqWcoPh6Sbj8=; b=tuxdxJYWITXTXJrSeKE6Pp7Qdw3UjIPWLT8Mh65TbCEFNQPdQnYRVTmhdGdX2fSW8y gmiCsP2kLvutbmdYwJe3pvSkonznIcotSUyhZRsQg8TzRtxyA9mj0UMmtwJy1r1kBlTg A8Lc3LJpZXk+GtQ8UF1HmeP2LyYthmUhWuEea/aws49VEzkQ7H0bmOxkK0bI4GhhrwvL HAhIfwGsii7CJLhKeirzEgGFfYOdkNIWuplZiccaH++KWOOs9fTkrhXpK0oO9cSJRzwG tYl3GKDB01ahdrjqBH2jXxaTja+56DGIHEK7HVE50jXLsTeTUaiB3oJD+JA/HZGWJ9PP 04Ww== X-Gm-Message-State: APjAAAVJWQ9egpuDMSJEz2gyvT+BBwEVSXMXrsvxa8nYjRyxiwVUHp0O i13BB+UOBx5hPAxl7hN9JC8Se4rFBVk= X-Google-Smtp-Source: APXvYqxZlDNZuj8tWJvmN3ok594CA0UFWAMic6QK1HS7Ag3V7OtdiKqH4sXbHZVg6nmFZcwW7G3pLA== X-Received: by 2002:a1c:630b:: with SMTP id x11mr4300477wmb.135.1564748598498; Fri, 02 Aug 2019 05:23:18 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id l8sm150236068wrg.40.2019.08.02.05.23.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 05:23:15 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <87ef23allc.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Fri, 02 Aug 2019 12:49:19 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::335 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:239130 Archived-At: >>>>> On Fri, 02 Aug 2019 12:49:19 +0200, Lars Ingebrigtsen said: Lars> Robert Pluim writes: Lars> Fix reference to `tags-loop-continue' in doc string >>=20 Lars> * lisp/dired-aux.el (dired-do-search): Refer to Lars> `fileloop-continue' instead of the obsolete `tags-loop-continue' Lars> (bug#21475). >>=20 >> Hmm, in the interests of backwards compatibility, could >> 'xref-pop-marker-stack' not check 'last-command'? Lars> Hm... would that help? The UI previously here was that you coul= d just Lars> hit `M-,' (or was it `M-.'?) and go to the next hit -- no matter = what Lars> the previous command was? I think? I think you=CA=BCre right. Unfortunately fileloop has no "fileloop is in progress" flag, nor would it help, because sometimes you do want the xref behaviour. Lars> But `xref-pop-marker-stack' could perhaps possibly check whether Lars> `fileloop-continue' has something to offer instead of erroring ou= t? Ah, you mean like this? I hope I have the eval-when-compile stuff right. And if you do 'dired-do-search' followed by 'xref-find-definitions' it would be easy to confuse yourself. We could find a new binding for fileloop-continue, which also breaks backwards compatibility, but then at least there=CA=BCs a default binding. diff --git i/lisp/progmodes/xref.el w/lisp/progmodes/xref.el index 8dc4f3c471..d9245e2822 100644 --- i/lisp/progmodes/xref.el +++ w/lisp/progmodes/xref.el @@ -70,6 +70,7 @@ (require 'eieio) (require 'ring) (require 'project) +(eval-when-compile (declare-function fileloop-continue "fileloop" ())) =20 (defgroup xref nil "Cross-referencing commands" :version "25.1" @@ -380,14 +381,15 @@ xref-pop-marker-stack "Pop back to where \\[xref-find-definitions] was last invoked." (interactive) (let ((ring xref--marker-ring)) - (when (ring-empty-p ring) - (user-error "Marker stack is empty")) - (let ((marker (ring-remove ring 0))) - (switch-to-buffer (or (marker-buffer marker) - (user-error "The marked buffer has been delete= d"))) - (goto-char (marker-position marker)) - (set-marker marker nil nil) - (run-hooks 'xref-after-return-hook)))) + (if (ring-empty-p ring) + ;; Just in case we were in a fileloop sequence + (fileloop-continue) + (let ((marker (ring-remove ring 0))) + (switch-to-buffer (or (marker-buffer marker) + (user-error "The marked buffer has been dele= ted"))) + (goto-char (marker-position marker)) + (set-marker marker nil nil) + (run-hooks 'xref-after-return-hook))))) =20 (defvar xref--current-item nil) =20