Skip to content

Commit

Permalink
Pre-declare free variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
gcv committed Aug 28, 2022
1 parent bdfcce3 commit 866c699
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions perspective.el
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,7 @@ were merged in from a previous call to `persp-merge'."
;; Emacs 29:
(defun persp--set-xref-marker-ring ()
"Set xref--history per persp."
(defvar xref--history)
(let ((persp-curr-name (persp-name (persp-curr))))
(unless (gethash persp-curr-name persp--xref-marker-ring)
(puthash persp-curr-name (cons nil nil)
Expand All @@ -2257,6 +2258,8 @@ were merged in from a previous call to `persp-merge'."
;; Emacs 28 and earlier:
(defun persp--set-xref-marker-ring ()
"Set xref--marker-ring per persp."
(defvar xref-marker-ring-length)
(defvar xref--marker-ring)
(let ((persp-curr-name (persp-name (persp-curr))))
(unless (gethash persp-curr-name persp--xref-marker-ring)
(puthash persp-curr-name (make-ring xref-marker-ring-length)
Expand Down

0 comments on commit 866c699

Please sign in to comment.