diff options
| author | Constantine Vetoshev <gepardcv@gmail.com> | 2021-06-09 16:20:26 -0700 |
|---|---|---|
| committer | Constantine Vetoshev <gepardcv@gmail.com> | 2021-06-09 16:20:26 -0700 |
| commit | ed0e300681367bcf721d767d774d4e4b1301827f (patch) | |
| tree | 9f75f3bdc867a4ffa45eff69e1025e5fde27c22b | |
| parent | a2849f92728e38b2525d1395382b3ac8dc8e42df (diff) | |
Make xref integration work by default.
| -rw-r--r-- | perspective.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perspective.el b/perspective.el index 1172588..5537e33 100644 --- a/perspective.el +++ b/perspective.el @@ -34,6 +34,7 @@ (require 'rx) (require 'subr-x) (require 'thingatpt) +(require 'xref) ;;; --- customization @@ -675,6 +676,7 @@ If NORECORD is non-nil, do not update the (unless norecord (run-hooks 'persp-before-switch-hook)) (persp-activate persp) + (persp--set-xref-marker-ring) (unless norecord (setf (persp-last-switch-time persp) (current-time)) (run-hooks 'persp-switch-hook)) @@ -1699,11 +1701,8 @@ restored." (defvar persp--xref-marker-ring (make-hash-table :test 'equal)) -;;;###autoload -(defun persp-set-xref-marker-ring () +(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) |
