emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/sly 554e6b0 3/5: Fix #484, #479: Use xref-push-marker-stac


From: ELPA Syncer
Subject: [nongnu] elpa/sly 554e6b0 3/5: Fix #484, #479: Use xref-push-marker-stack when available
Date: Fri, 24 Dec 2021 11:58:00 -0500 (EST)

branch: elpa/sly
commit 554e6b09d9741f6367e144a1165e3c7fa2e3a8c3
Author: Theodor Thornhill <theo@thornhill.no>
Commit: GitHub <noreply@github.com>

    Fix #484, #479: Use xref-push-marker-stack when available
    
    * sly.el (sly-push-definition-stack): Inserting directly into
    `find-tag-marker-ring` is obsolete since emacs 25.1.  As of emacs 29 sly no
    longer is able to jump back and forth between definition and usage with 
`M-.`
    and `M-,`.  As a precaution for backwards compatibility, we use
    `xref-push-marker-stack` only when it is bound.
---
 sly.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sly.el b/sly.el
index 76fe65d..0dbd6bb 100644
--- a/sly.el
+++ b/sly.el
@@ -3910,7 +3910,10 @@ For insertion in the `compilation-mode' buffer"
 
 (defun sly-push-definition-stack ()
   "Add point to find-tag-marker-ring."
-  (ring-insert find-tag-marker-ring (point-marker)))
+  (require 'etags)
+  (if (fboundp 'xref-push-marker-stack)
+      (xref-push-marker-stack)
+    (ring-insert find-tag-marker-ring (point-marker))))
 
 (defun sly-pop-find-definition-stack ()
   "Pop the edit-definition stack and goto the location."



reply via email to

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