about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-editor.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-08-10 15:58:21 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-08-10 15:58:21 +0100
commit2b8de54c83d50020e16e996b3f24372069c6b5aa (patch)
treea58d2dd0de0a2e2ac891547bb74643d71e765f88 /.emacs.d/lisp/init-editor.el
parent39de3866eee6c536cc9d263f45493b151b4c0fea (diff)
downloaddotfiles-2b8de54c83d50020e16e996b3f24372069c6b5aa.tar.gz
Add xref-find-references-other-frame
Diffstat (limited to '.emacs.d/lisp/init-editor.el')
-rw-r--r--.emacs.d/lisp/init-editor.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-editor.el b/.emacs.d/lisp/init-editor.el
index a1ce514..0412618 100644
--- a/.emacs.d/lisp/init-editor.el
+++ b/.emacs.d/lisp/init-editor.el
@@ -197,12 +197,18 @@ and file 'filename' will be opened and cursor set on line 'linenumber'"
     "Like `xref-find-references' but switch to the other window"
     (interactive (list (xref--read-identifier "Find references of: ")))
       (xref--find-xrefs identifier 'references identifier 'window))
+  (defun xref-find-references-other-frame (identifier)
+    "Like `xref-find-references' but switch to the other frame"
+    (interactive (list (xref--read-identifier "Find references of: ")))
+    (xref--find-xrefs identifier 'references identifier 'frame))
   (define-key ctl-x-4-map (kbd "M-?") 'xref-find-references-other-window)
+  (define-key ctl-x-5-map (kbd "M-?") 'xref-find-references-other-window)
   ;; 'xref-prompt-for-identifier begins with not, so adding this prevents
   ;; prompting for an identifier when calling xref-find-references, unless
   ;; there is no value at point that can be used
   (add-to-list 'xref-prompt-for-identifier 'xref-find-references t)
-  (add-to-list 'xref-prompt-for-identifier 'xref-find-references-other-window t))
+  (add-to-list 'xref-prompt-for-identifier 'xref-find-references-other-window t)
+  (add-to-list 'xref-prompt-for-identifier 'xref-find-references-other-frame t))
 
 (provide 'init-editor)
 ;;; init-editor.el ends here