From: Robert Pluim <rpluim@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: master fe939b3 1/2: Fix reference to `tags-loop-continue' in doc string
Date: Fri, 02 Aug 2019 14:23:15 +0200 [thread overview]
Message-ID: <m2v9vfycwc.fsf@gmail.com> (raw)
In-Reply-To: <87ef23allc.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Fri, 02 Aug 2019 12:49:19 +0200")
>>>>> On Fri, 02 Aug 2019 12:49:19 +0200, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Robert Pluim <rpluim@gmail.com> writes:
Lars> Fix reference to `tags-loop-continue' in doc string
>>
Lars> * lisp/dired-aux.el (dired-do-search): Refer to
Lars> `fileloop-continue' instead of the obsolete `tags-loop-continue'
Lars> (bug#21475).
>>
>> 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 could 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ʼre 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 out?
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ʼs 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" ()))
(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 deleted")))
- (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 deleted")))
+ (goto-char (marker-position marker))
+ (set-marker marker nil nil)
+ (run-hooks 'xref-after-return-hook)))))
(defvar xref--current-item nil)
next prev parent reply other threads:[~2019-08-02 12:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190801195403.16246.49802@vcs0.savannah.gnu.org>
[not found] ` <20190801195406.087AF20CC8@vcs0.savannah.gnu.org>
2019-08-02 8:59 ` master fe939b3 1/2: Fix reference to `tags-loop-continue' in doc string Robert Pluim
2019-08-02 10:49 ` Lars Ingebrigtsen
2019-08-02 12:23 ` Robert Pluim [this message]
2019-08-02 18:27 ` Lars Ingebrigtsen
2019-08-04 12:03 ` Robert Pluim
2019-08-04 12:09 ` Lars Ingebrigtsen
2019-08-04 12:24 ` Robert Pluim
2019-08-05 9:12 ` Lars Ingebrigtsen
2019-08-05 10:39 ` Dmitry Gutov
2019-08-05 10:46 ` Lars Ingebrigtsen
2019-08-05 10:54 ` Lars Ingebrigtsen
2019-08-05 13:12 ` Robert Pluim
2019-08-05 10:42 ` Dmitry Gutov
2019-08-05 15:05 ` Drew Adams
2019-08-05 18:50 ` Dmitry Gutov
2019-08-05 19:58 ` Juri Linkov
2019-08-07 18:33 ` Lars Ingebrigtsen
2019-08-07 22:11 ` Dmitry Gutov
2019-08-08 20:45 ` Juri Linkov
2019-08-06 3:23 ` Richard Stallman
2019-08-05 10:36 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2v9vfycwc.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).