diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2024-07-13 13:36:54 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2024-07-13 13:36:54 +0100 |
| commit | c48906180ce83808245944096ac737d595512b77 (patch) | |
| tree | 79dea2e8ce498851ea99cdaa7f95a5c0f78b2b24 /emacs | |
| parent | 38898f03c5a4ef5059678c1e2403a3e8d92eda24 (diff) | |
emacs: Consolidate Dired configuration
Diffstat (limited to 'emacs')
| -rw-r--r-- | emacs/init.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/emacs/init.el b/emacs/init.el index 305e077..8200d04 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -161,16 +161,17 @@ ;; Dired (use-package dired - :bind (:map dired-mode-map ("b" . dired-up-directory)) - :defer t + :config + (defun my/dired-hooks () + (setq-local mouse-1-click-follows-link (- mouse-1-click-follows-link))) + (put 'dired-find-alternate-file 'disabled nil) + :bind + (:map dired-mode-map + ("b" . dired-up-directory) + ("<mouse-1>" . dired-find-file)) + :hook (dired-mode . my/dired-hooks) :custom (dired-listing-switches (concat dired-listing-switches " -h"))) -(put 'dired-find-alternate-file 'disabled nil) - -(my/with-add-hook 'dired-mode-hook - (setq-local mouse-1-click-follows-link (- mouse-1-click-follows-link)) - (keymap-local-set "<mouse-1>" #'dired-find-file)) - ;; Eshell |
