summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-07-13 13:36:54 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2024-07-13 13:36:54 +0100
commitc48906180ce83808245944096ac737d595512b77 (patch)
tree79dea2e8ce498851ea99cdaa7f95a5c0f78b2b24
parent38898f03c5a4ef5059678c1e2403a3e8d92eda24 (diff)
emacs: Consolidate Dired configuration
-rw-r--r--emacs/init.el17
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