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`.
This commit is contained in:
parent
082e080c30
commit
03d7dcb461
2 changed files with 7 additions and 10 deletions
|
@ -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)))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue