unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* 25.0.95; CEDET should use xref marker stack when jumping
@ 2016-06-18 10:55 Bastian Beischer
  2019-06-25 13:13 ` bug#23793: " Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Bastian Beischer @ 2016-06-18 10:55 UTC (permalink / raw)
  To: bug-gnu-emacs, cedet-devel

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

CEDET / Semantic should use xref-push-marker-stack when jumping to a
tag, this makes it easy to pop back to the original place.

Patch for Emacs 25.0.95 is attached - but maybe there are more places
that need fixing? There's also the option to put this in
semantic-go-to-tag directly.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to add xref-push-marker-stack to CEDET navigation --]
[-- Type: text/x-diff, Size: 3215 bytes --]

diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el
index f876827..1087dbd 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -347,6 +347,8 @@ semantic-analyze-proto-impl-toggle
 	     (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)
     (switch-to-buffer (current-buffer))
     (semantic-momentary-highlight-tag target))
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index de76232..825ca8d 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -2105,6 +2105,8 @@ semantic-complete-jump-local
   (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 "
@@ -2119,6 +2121,8 @@ semantic-complete-jump
   (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)
       (switch-to-buffer (current-buffer))
       (semantic-momentary-highlight-tag tag)
@@ -2138,6 +2142,8 @@ semantic-complete-jump-local-members
 	(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 214fbb5..562d3cf 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -316,8 +316,8 @@ semantic-ia--fast-jump-helper
   ;; 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 @@ semantic-ia-fast-jump
       ;; 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 38abc9e..39ab639 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -526,6 +526,8 @@ senator-go-to-up-reference
     (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)

[-- Attachment #3: Type: text/plain, Size: 428 bytes --]

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Cedet-devel mailing list
Cedet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#23793: 25.0.95; CEDET should use xref marker stack when jumping
  2016-06-18 10:55 25.0.95; CEDET should use xref marker stack when jumping Bastian Beischer
@ 2019-06-25 13:13 ` Lars Ingebrigtsen
  2019-06-25 13:36   ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-25 13:13 UTC (permalink / raw)
  To: Bastian Beischer; +Cc: cedet-devel, 23793

Bastian Beischer <bastian.beischer@gmail.com> writes:

> CEDET / Semantic should use xref-push-marker-stack when jumping to a
> tag, this makes it easy to pop back to the original place.
>
> Patch for Emacs 25.0.95 is attached - but maybe there are more places
> that need fixing? There's also the option to put this in
> semantic-go-to-tag directly.

Thanks; I've applied it to the Emacs trunk.  It was just small enough to
apply without a copyright assignment, if I counted the lines correctly,
but for further changes, we'd need some copyright assignment paperwork.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#23793: 25.0.95; CEDET should use xref marker stack when jumping
  2019-06-25 13:13 ` bug#23793: " Lars Ingebrigtsen
@ 2019-06-25 13:36   ` Noam Postavsky
  0 siblings, 0 replies; 3+ messages in thread
From: Noam Postavsky @ 2019-06-25 13:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: cedet-devel, Bastian Beischer, 23793

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Thanks; I've applied it to the Emacs trunk.  It was just small enough to
> apply without a copyright assignment, if I counted the lines correctly,
> but for further changes, we'd need some copyright assignment paperwork.

As far as I understand it, the patch is essentially
s/push-tag-mark/xref-push-marker-stack/ + copying that call to a few
other places, so it counts as one line for copyright purposes.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-25 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 10:55 25.0.95; CEDET should use xref marker stack when jumping Bastian Beischer
2019-06-25 13:13 ` bug#23793: " Lars Ingebrigtsen
2019-06-25 13:36   ` Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).