aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-03-24 23:19:55 +0200
committerJuri Linkov2019-03-24 23:19:55 +0200
commit36535caf9621f984f7f95d4def09bdb0ae2f1d2a (patch)
tree3f873577b7295b48dcdb8a212425320971e1cdbe
parent03e916beb0186f3707cd238650298870bf471575 (diff)
downloademacs-36535caf9621f984f7f95d4def09bdb0ae2f1d2a.tar.gz
emacs-36535caf9621f984f7f95d4def09bdb0ae2f1d2a.zip
* lisp/progmodes/xref.el (xref--show-xrefs): Push mark. (Bug#34908)
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/progmodes/xref.el1
2 files changed, 5 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9f569a73673..cb485992b8d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -671,6 +671,10 @@ mouse click event, and is intended to be bound to a mouse event.
671Previously, setting 'xref-marker-ring-length' would only take effect 671Previously, setting 'xref-marker-ring-length' would only take effect
672if set before 'xref.el' was loaded. 672if set before 'xref.el' was loaded.
673 673
674---
675*** xref-find-definitions now sets the mark at the buffer position
676where it was invoked
677
674** Ecomplete 678** Ecomplete
675 679
676*** The ecomplete sorting has changed to a decay-based algorithm. 680*** The ecomplete sorting has changed to a decay-based algorithm.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 6974d000483..aed92f8db62 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -797,6 +797,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
797(defvar xref--read-pattern-history nil) 797(defvar xref--read-pattern-history nil)
798 798
799(defun xref--show-xrefs (xrefs display-action &optional always-show-list) 799(defun xref--show-xrefs (xrefs display-action &optional always-show-list)
800 (unless (region-active-p) (push-mark nil t))
800 (cond 801 (cond
801 ((and (not (cdr xrefs)) (not always-show-list)) 802 ((and (not (cdr xrefs)) (not always-show-list))
802 (xref-push-marker-stack) 803 (xref-push-marker-stack)