summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2014-07-16 21:37:12 +0100
committerAlan Pearce2014-07-16 21:37:12 +0100
commit1fcdf96677414dc49afe2c3225ed79aa11ee8956 (patch)
tree5b575a2890be5ce2049d359010310e9360d1e169 /tag-emacs
parenta1cd5937fc7d4a73c7b3a9a7dcae23ac5c09bde5 (diff)
downloaddotfiles-1fcdf96677414dc49afe2c3225ed79aa11ee8956.tar.lz
dotfiles-1fcdf96677414dc49afe2c3225ed79aa11ee8956.tar.zst
dotfiles-1fcdf96677414dc49afe2c3225ed79aa11ee8956.zip
Emacs: Run dired-omit-mode in the correct place
Needs to run in dired-mode-hook. Create a wrapper command so that we can
call it interactively otherwise.
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el
index b29e9c0..be54eec 100644
--- a/tag-emacs/emacs.d/init.el
+++ b/tag-emacs/emacs.d/init.el
@@ -286,7 +286,10 @@
             (diredp-toggle-find-file-reuse-dir 1)
             (unbind-key "C-h C-m" dired-mode-map)
             (bind-key "." #'diredp-describe-file dired-mode-map)
-            (dired-omit-mode 1)
+            (defun turn-on-dired-omit-mode ()
+              (interactive)
+              (dired-omit-mode 1))
+            (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode)
             (setq dired-omit-files "#\\|\\.$"
                   dired-find-subdir t)))