emacs-diffs
[Top][All Lists]
Advanced

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

master 03d7dcb: Don't use obsolete variable `find-tag-marker-ring`


From: Mattias Engdegård
Subject: master 03d7dcb: Don't use obsolete variable `find-tag-marker-ring`
Date: Sun, 24 Oct 2021 09:23:44 -0400 (EDT)

branch: master
commit 03d7dcb4610b0f8edf53427c2354cf52fa506edd
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Don't use obsolete variable `find-tag-marker-ring`
    
    * lisp/progmodes/js.el (js-find-symbol):
    * lisp/progmodes/octave.el (octave-find-definition):
    Call `xref-push-marker-stack` instead of manipulating the obsolete
    variable `find-tag-marker-ring`.
---
 lisp/progmodes/js.el     | 9 +++------
 lisp/progmodes/octave.el | 8 ++++----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f6603f8..f119951 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3290,10 +3290,7 @@ marker."
           (setf (car bounds) (point))))
       (buffer-substring (car bounds) (cdr bounds)))))
 
-(defvar find-tag-marker-ring)           ; etags
-
-;; etags loads ring.
-(declare-function ring-insert "ring" (ring item))
+(declare-function xref-push-marker-stack "xref" (&optional m))
 
 (defun js-find-symbol (&optional arg)
   "Read a JavaScript symbol and jump to it.
@@ -3301,7 +3298,7 @@ With a prefix argument, restrict symbols to those from the
 current buffer.  Pushes a mark onto the tag ring just like
 `find-tag'."
   (interactive "P")
-  (require 'etags)
+  (require 'xref)
   (let (symbols marker)
     (if (not arg)
         (setq symbols (js--get-all-known-symbols))
@@ -3313,7 +3310,7 @@ current buffer.  Pushes a mark onto the tag ring just like
                        symbols "Jump to: "
                        (js--guess-symbol-at-point))))
 
-    (ring-insert find-tag-marker-ring (point-marker))
+    (xref-push-marker-stack)
     (switch-to-buffer (marker-buffer marker))
     (push-mark)
     (goto-char marker)))
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 6bf070c..79530f8 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1814,18 +1814,18 @@ If the environment variable OCTAVE_SRCDIR is set, it is 
searched first."
        (user-error "Aborted")))
     (_ name)))
 
-(defvar find-tag-marker-ring)
+(declare-function xref-push-marker-stack "xref" (&optional m))
 
 (defun octave-find-definition (fn)
   "Find the definition of FN.
 Functions implemented in C++ can be found if
 variable `octave-source-directories' is set correctly."
   (interactive (list (octave-completing-read)))
-  (require 'etags)
+  (require 'xref)
   (let ((orig (point)))
     (if (and (derived-mode-p 'octave-mode)
              (octave-goto-function-definition fn))
-        (ring-insert find-tag-marker-ring (copy-marker orig))
+        (xref-push-marker-stack (copy-marker orig))
       (inferior-octave-send-list-and-digest
        ;; help NAME is more verbose
        (list (format "\
@@ -1840,7 +1840,7 @@ if iskeyword('%s') disp('`%s'' is a keyword') else 
which('%s') endif\n"
             (setq file (match-string 1 line))))
         (if (not file)
             (user-error "%s" (or line (format-message "`%s' not found" fn)))
-          (ring-insert find-tag-marker-ring (point-marker))
+          (xref-push-marker-stack)
           (setq file (funcall octave-find-definition-filename-function file))
           (when file
             (find-file file)



reply via email to

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