diff options
| author | Juri Linkov | 2019-03-24 23:19:55 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-03-24 23:19:55 +0200 |
| commit | 36535caf9621f984f7f95d4def09bdb0ae2f1d2a (patch) | |
| tree | 3f873577b7295b48dcdb8a212425320971e1cdbe | |
| parent | 03e916beb0186f3707cd238650298870bf471575 (diff) | |
| download | emacs-36535caf9621f984f7f95d4def09bdb0ae2f1d2a.tar.gz emacs-36535caf9621f984f7f95d4def09bdb0ae2f1d2a.zip | |
* lisp/progmodes/xref.el (xref--show-xrefs): Push mark. (Bug#34908)
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/progmodes/xref.el | 1 |
2 files changed, 5 insertions, 0 deletions
| @@ -671,6 +671,10 @@ mouse click event, and is intended to be bound to a mouse event. | |||
| 671 | Previously, setting 'xref-marker-ring-length' would only take effect | 671 | Previously, setting 'xref-marker-ring-length' would only take effect |
| 672 | if set before 'xref.el' was loaded. | 672 | if set before 'xref.el' was loaded. |
| 673 | 673 | ||
| 674 | --- | ||
| 675 | *** xref-find-definitions now sets the mark at the buffer position | ||
| 676 | where 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) |