From c48906180ce83808245944096ac737d595512b77 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 13 Jul 2024 13:36:54 +0100 Subject: emacs: Consolidate Dired configuration --- emacs/init.el | 17 +++++++++-------- 1 file 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) + ("" . 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 "" #'dired-find-file)) - ;; Eshell -- cgit v1.2.3-70-g09d2