summaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
Diffstat (limited to '.emacs')
-rw-r--r--.emacs20
1 files changed, 1 insertions, 19 deletions
diff --git a/.emacs b/.emacs
index b044ac8..93a1a47 100644
--- a/.emacs
+++ b/.emacs
@@ -213,14 +213,6 @@
(shell-command (concat command--help) help-buf)
(display-buffer help-buf)))
-(defun my/make-project-wide (f)
- "Make a function which will run F from the project's root directory."
- (lambda ()
- (:documentation (format "Run `%s' from the project's root directory." f))
- (interactive)
- (let ((default-directory (my/project-root)))
- (call-interactively f))))
-
(defun my/magit-project ()
(interactive)
(require 'project)
@@ -272,6 +264,7 @@
'(("d" my/magit-toggle-margin-date)
("f" magit-file-dispatch)
("g" magit-status)
+ ("p" my/magit-project)
("x" magit-dispatch)
("\C-f" magit-find-file)))
@@ -294,10 +287,6 @@
("m" man)
("s" shortdoc-display-group)))
-(my/define-prefix-command my/project-map
- "Keymap for project-related commands."
- '(("g" my/magit-project)))
-
(my/define-prefix-command my/whitespace-map
"Keymap for whitespace-related commands."
'(("c" whitespace-cleanup)
@@ -315,15 +304,8 @@
(global-set-key (kbd "C-c i") 'my/input-map)
(global-set-key (kbd "C-c k") 'my/kill-map)
(global-set-key (kbd "C-c m") 'my/manual-map)
-(global-set-key (kbd "C-c p") 'my/project-map)
(global-set-key (kbd "C-c w") 'my/whitespace-map)
-(unless (>= emacs-major-version 28)
- (define-key my/project-map "c" (my/make-project-wide 'compile))
- (define-key my/project-map "f" 'project-find-file)
- (define-key my/project-map "!" (my/make-project-wide 'shell-command))
- (define-key my/project-map "&" (my/make-project-wide 'async-shell-command)))
-
(rg-enable-default-bindings) ; Uses the C-c s prefix.
;; What's life without a little risk?