From 0550d9ed977e6961e1ccaea601956a77b2760ffa Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 7 Apr 2021 12:56:14 -0500 Subject: Add `acdw/find-emacs-dotfiles' --- init.el | 6 +++--- lisp/acdw.el | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 704b307..05a1382 100644 --- a/init.el +++ b/init.el @@ -204,7 +204,8 @@ (:global "M-SPC" cycle-spacing "M-/" hippie-expand "M-=" count-words - "C-x C-b" ibuffer)) + "C-x C-b" ibuffer + "C-c i" acdw/find-emacs-dotfiles)) ;; Regular modes (`text-mode', `prog-mode', etc.) (defun acdw/setup-regular-modes () @@ -475,8 +476,7 @@ "C-k" crux-kill-and-join-forward "C-o" crux-smart-open-line-above "C-S-o" crux-smart-open-line - "C-M-\\" crux-cleanup-buffer-or-region - "C-c i" crux-find-user-init-file) + "C-M-\\" crux-cleanup-buffer-or-region) (crux-reopen-as-root-mode +1)) (setup (:straight avy) diff --git a/lisp/acdw.el b/lisp/acdw.el index 7b555fd..fd33514 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -110,6 +110,14 @@ if MAKE-DIRECTORY is non-nil." (run-at-time sunset-time (* 60 60 24) sunset-command) (run-at-time "12:00am" (* 60 60 24) sunset-command))) +(defun acdw/find-emacs-dotfiles () + "Finds lisp files in `user-emacs-directory' and passes them to + `completing-read'." + (interactive) + (find-file (completing-read ".emacs: " + (directory-files-recursively + user-emacs-directory "\.el$")))) + ;; Make `C-z' more useful (defvar acdw/leader -- cgit 1.4.1-21-gabe81