[dired] follow function naming conventions

This commit is contained in:
Max Nickel 2019-10-27 17:47:20 -04:00
parent 9d55e75bd8
commit 49fce0b1c3
2 changed files with 5 additions and 5 deletions

View file

@ -9,12 +9,12 @@
;;;###autoload
(defun +dired/enable-git-info-h ()
(defun +dired-enable-git-info-h ()
(if (locate-dominating-file "." ".git")
(dired-git-info-mode 1)))
;;;###autoload
(defun +dired/dotfiles-hide ()
(defun +dired-dotfiles-hide ()
(set (make-local-variable '+dired-dotfiles-show-p) nil)
(dired-mark-files-regexp "^\\\.")
(dired-do-kill-lines))
@ -24,6 +24,6 @@
(interactive)
(when (equal major-mode 'dired-mode)
(if (or (not (boundp '+dired-dotfiles-show-p)) +dired-dotfiles-show-p) ; if currently showing
(+dired/dotfiles-hide)
(+dired-dotfiles-hide)
(progn (revert-buffer) ; otherwise just revert to re-show
(set (make-local-variable '+dired-dotfiles-show-p) t)))))

View file

@ -48,7 +48,7 @@ only variant that supports --group-directories-first."
;; hide details by default
(add-hook 'dired-mode-hook 'dired-hide-details-mode)
;; hide dotfiles by default
(add-hook 'dired-after-readin-hook '+dired/dotfiles-hide)
(add-hook 'dired-after-readin-hook '+dired-dotfiles-hide)
;; Don't complain about this command being disabled when we use it
(put 'dired-find-alternate-file 'disabled nil)
@ -180,4 +180,4 @@ we have to clean it up ourselves."
:after dired
:init
(progn
(add-hook 'dired-after-readin-hook '+dired/enable-git-info-h)))
(add-hook 'dired-after-readin-hook '+dired-enable-git-info-h)))