[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34908: Push mark in xref-push-marker-stack
From: |
Dmitry Gutov |
Subject: |
bug#34908: Push mark in xref-push-marker-stack |
Date: |
Thu, 21 Mar 2019 02:59:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 20.03.2019 23:59, Juri Linkov wrote:
Do you think other commands that use xref-push-marker-stack
won't need setting the mark?
Like I said, they probably already do. And this is a matter of a
function changing into its related data structure.
If we're going to make xref-push-marker-stack a
single-stop-to-modify-all-stacks, that should be discussed first. Like I
said, I don't have a lot of clarity about how and why people use the
global/local marker stacks.
(defun xref--show-xrefs (xrefs display-action &optional always-show-list)
+ (push-mark nil t)
push-mark is usually called closer to the end of the command.
You mean text-wise? I don't think it will make any practical difference
in this case.
(cond
((and (not (cdr xrefs)) (not always-show-list))
(xref-push-marker-stack)
Some commands like e.g. ‘goto-line’ use such idiom:
(or (region-active-p) (push-mark))
Sure, fine by me.
We'll still want to call xref-push-marker-stack unconditionally, though.
bug#34908: Push mark in xref-push-marker-stack, Eli Zaretskii, 2019/03/19