diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-08-19 13:57:55 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2023-08-20 23:30:19 +0200 |
| commit | 1d1bac10dd5c314701cc5d375d2dd6f3c9bbf468 (patch) | |
| tree | b8a5e311ec99688f07b0b557855f5a6e73d5c772 | |
| parent | a550929fe645ee12e91dc568a71d7aa51a89bc5d (diff) | |
| download | dotfiles-1d1bac10dd5c314701cc5d375d2dd6f3c9bbf468.tar.xz | |
Cleanup project-related commands
* Remove provisions for Emacs<28.
* Move Magit command to my/magit-map.
| -rw-r--r-- | .emacs | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -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? |
