about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-09-04 16:06:18 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-09-04 16:06:18 +0100
commit4993f88d433ba1ee80cb0865c044768181b577f8 (patch)
treefbac162034a2620bb8c1840472dcbb1de4332548
parent95a541923b74f42d8173e41ee09abc5a6a42c4ff (diff)
downloaddotfiles-4993f88d433ba1ee80cb0865c044768181b577f8.tar.gz
Don't prompt for an identifier when calling xref-find-references
-rw-r--r--.emacs.d/lisp/init-editor.el5
-rw-r--r--.emacs.d/lisp/init-paredit-x.el107
2 files changed, 5 insertions, 107 deletions
diff --git a/.emacs.d/lisp/init-editor.el b/.emacs.d/lisp/init-editor.el
index 1946b46..9b8e90d 100644
--- a/.emacs.d/lisp/init-editor.el
+++ b/.emacs.d/lisp/init-editor.el
@@ -190,5 +190,10 @@ and file 'filename' will be opened and cursor set on line 'linenumber'"
   :bind
   ("C-c ." . operate-on-number-at-point))
 
+(use-package xref
+  :ensure nil
+  :config
+  (add-to-list 'xref-prompt-for-identifier 'xref-find-references t))
+
 (provide 'init-editor)
 ;;; init-editor.el ends here
diff --git a/.emacs.d/lisp/init-paredit-x.el b/.emacs.d/lisp/init-paredit-x.el
deleted file mode 100644
index 41cf7ba..0000000
--- a/.emacs.d/lisp/init-paredit-x.el
+++ /dev/null
@@ -1,107 +0,0 @@
-;;; init-paredit-x.el --- Paredit Extra Configuration File -*- lexical-binding: t -*-
-;;; Commentary:
-;; Code taken from emacswiki and https://github.com/bodil/emacs.d/blob/master/bodil/bodil-paredit.el
-;;; Code:
-
-(with-eval-after-load 'paredit
-;; From emacswiki
-(defun paredit-barf-all-the-way-backward ()
-  (interactive)
-  (paredit-split-sexp)
-  (paredit-backward-down)
-  (paredit-splice-sexp))
-
-(defun paredit-barf-all-the-way-forward ()
-  (interactive)
-  (paredit-split-sexp)
-  (paredit-forward-down)
-  (paredit-splice-sexp)
-  (if (eolp) (delete-horizontal-space)))
-
-(defun paredit-slurp-all-the-way-backward ()
-  (interactive)
-  (catch 'done
-    (while (not (bobp))
-      (save-excursion
-        (paredit-backward-up)
-        (if (eq (char-before) ?\()
-            (throw 'done t)))
-      (paredit-backward-slurp-sexp))))
-
-(defun paredit-slurp-all-the-way-forward ()
-  (interactive)
-  (catch 'done
-    (while (not (eobp))
-      (save-excursion
-        (paredit-forward-up)
-        (if (eq (char-after) ?\))
-            (throw 'done t)))
-      (paredit-forward-slurp-sexp))))
-
-(nconc paredit-commands
-       '("Extreme Barfage & Slurpage"
-         (("C-M-)")
-          paredit-slurp-all-the-way-forward
-          ("(foo (bar |baz) quux zot)"
-           "(foo (bar |baz quux zot))")
-          ("(a b ((c| d)) e f)"
-           "(a b ((c| d)) e f)"))
-         (("C-M-}" "M-F")
-          paredit-barf-all-the-way-forward
-          ("(foo (bar |baz quux) zot)"
-           "(foo (bar|) baz quux zot)"))
-         (("C-M-(")
-          paredit-slurp-all-the-way-backward
-          ("(foo bar (baz| quux) zot)"
-           "((foo bar baz| quux) zot)")
-          ("(a b ((c| d)) e f)"
-           "(a b ((c| d)) e f)"))
-         (("C-M-{" "M-B")
-          paredit-barf-all-the-way-backward
-          ("(foo (bar baz |quux) zot)"
-           "(foo bar baz (|quux) zot)"))))
-
-(paredit-define-keys)
-(paredit-annotate-mode-with-examples)
-(paredit-annotate-functions-with-examples)
-
-;; From https://github.com/bodil/emacs.d/blob/master/bodil/bodil-paredit.el
-;; Inverse M-(
-(defun paredit-wrap-round-from-behind ()
-  (interactive)
-  (forward-sexp -1)
-  (paredit-wrap-round)
-  (insert " ")
-  (forward-char -1))
-(eval-after-load "paredit"
-  '(define-key paredit-mode-map (kbd "M-)")
-     'paredit-wrap-round-from-behind))
-
-;; From https://github.com/bodil/emacs.d/blob/master/bodil/bodil-paredit.el
-;; Duplicate sexp
-(defun paredit-duplicate-after-point
-  ()
-  "Duplicates the content of the line that is after the point."
-  (interactive)
-  ;; skips to the next sexp
-  (while (looking-at " ")
-    (forward-char))
-  (set-mark-command nil)
-  ;; while we find sexps we move forward on the line
-  (while (and (<= (point) (car (bounds-of-thing-at-point 'sexp)))
-              (not (= (point) (line-end-position))))
-    (forward-sexp)
-    (while (looking-at " ")
-      (forward-char)))
-  (kill-ring-save (mark) (point))
-  ;; go to the next line and copy the sexprs we encountered
-  (paredit-newline)
-  (set-mark-command nil)
-  (yank)
-  (exchange-point-and-mark)))
-(eval-after-load "paredit"
-  '(define-key paredit-mode-map (kbd "C-c C-S-d")
-     'paredit-duplicate-after-point))
-
-(provide 'init-paredit-x)
-;;; init-paredit-x.el ends here