[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e195bbd 1/2: Use xref in cedet
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master e195bbd 1/2: Use xref in cedet |
Date: |
Tue, 25 Jun 2019 09:45:51 -0400 (EDT) |
branch: master
commit e195bbd95a35a5aeaf3689ff9e9293d350bb4056
Author: Bastian Beischer <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Use xref in cedet
* lisp/cedet/semantic/complete.el (semantic-complete-jump-local)
* lisp/cedet/semantic/analyze/refs.el
(semantic-analyze-proto-impl-toggle): Use xref to handle jumping
(bug#23793).
Copyright-paperwork-exempt: yes
---
lisp/cedet/semantic/analyze/refs.el | 2 ++
lisp/cedet/semantic/complete.el | 6 ++++++
lisp/cedet/semantic/ia.el | 8 ++++----
lisp/cedet/semantic/senator.el | 2 ++
4 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/lisp/cedet/semantic/analyze/refs.el
b/lisp/cedet/semantic/analyze/refs.el
index cb0f464..179aa5f 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -346,6 +346,8 @@ Only works for tags in the global namespace."
(if (semantic-tag-prototype-p tag) "implementation" "prototype")))
(push-mark)
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(semantic-go-to-tag target)
(pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag target))
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index bf86c3f..e95f08e 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -2100,6 +2100,8 @@ completion works."
(let ((tag (semantic-complete-read-tag-buffer-deep "Jump to symbol: ")))
(when (semantic-tag-p tag)
(push-mark)
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(goto-char (semantic-tag-start tag))
(semantic-momentary-highlight-tag tag)
(message "%S: %s "
@@ -2114,6 +2116,8 @@ completion works."
(let* ((tag (semantic-complete-read-tag-project "Jump to symbol: ")))
(when (semantic-tag-p tag)
(push-mark)
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(semantic-go-to-tag tag)
(pop-to-buffer-same-window (current-buffer))
(semantic-momentary-highlight-tag tag)
@@ -2133,6 +2137,8 @@ completion works."
(unless start
(error "Tag %s has no location" (semantic-format-tag-prototype tag)))
(push-mark)
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(goto-char start)
(semantic-momentary-highlight-tag tag)
(message "%S: %s "
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 1549f52..68c6e42 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -316,8 +316,8 @@ This helper manages the mark, buffer switching, and
pulsing."
;; 1) Push the mark, so you can pop global mark back, or
;; use semantic-mru-bookmark mode to do so.
(push-mark)
- (when (fboundp 'push-tag-mark)
- (push-tag-mark))
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
;; 2) Visits the tag.
(semantic-go-to-tag dest)
;; 3) go-to-tag doesn't switch the buffer in the current window,
@@ -385,8 +385,8 @@ origin of the code at point."
;; Push the mark, so you can pop global mark back, or
;; use semantic-mru-bookmark mode to do so.
(push-mark)
- (when (fboundp 'push-tag-mark)
- (push-tag-mark))
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(semantic-decoration-include-visit)
)
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index b36f801..f76d332 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -526,6 +526,8 @@ Some tags such as includes have other reference features."
(if (not result)
(error "No up reference found")
(push-mark)
+ (when (fboundp 'xref-push-marker-stack)
+ (xref-push-marker-stack))
(cond
;; A tag
((semantic-tag-p result)