emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 36535ca: * lisp/progmodes/xref.el (xref--show-xrefs


From: Juri Linkov
Subject: [Emacs-diffs] master 36535ca: * lisp/progmodes/xref.el (xref--show-xrefs): Push mark. (Bug#34908)
Date: Sun, 24 Mar 2019 17:20:03 -0400 (EDT)

branch: master
commit 36535caf9621f984f7f95d4def09bdb0ae2f1d2a
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/progmodes/xref.el (xref--show-xrefs): Push mark.  (Bug#34908)
---
 etc/NEWS               | 4 ++++
 lisp/progmodes/xref.el | 1 +
 2 files changed, 5 insertions(+)

diff --git a/etc/NEWS b/etc/NEWS
index 9f569a7..cb48599 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -671,6 +671,10 @@ mouse click event, and is intended to be bound to a mouse 
event.
 Previously, setting 'xref-marker-ring-length' would only take effect
 if set before 'xref.el' was loaded.
 
+---
+*** xref-find-definitions now sets the mark at the buffer position
+where it was invoked
+
 ** Ecomplete
 
 *** The ecomplete sorting has changed to a decay-based algorithm.
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 6974d00..aed92f8 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -797,6 +797,7 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
 (defvar xref--read-pattern-history nil)
 
 (defun xref--show-xrefs (xrefs display-action &optional always-show-list)
+  (unless (region-active-p) (push-mark nil t))
   (cond
    ((and (not (cdr xrefs)) (not always-show-list))
     (xref-push-marker-stack)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]