]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/xref.el (xref--show-xrefs): Push mark. (Bug#34908)
authorJuri Linkov <juri@linkov.net>
Sun, 24 Mar 2019 21:19:55 +0000 (23:19 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 24 Mar 2019 21:19:55 +0000 (23:19 +0200)
etc/NEWS
lisp/progmodes/xref.el

index 9f569a7367308f9196a3718684d47bdd7e6f2e6c..cb485992b8dce46c694de700d9ace23961aaa59c 100644 (file)
--- 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.
index 6974d000483e239acb7d9202602cb4c7c280c187..aed92f8db6286899d8014237c874e72ab2c41d04 100644 (file)
@@ -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)