mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Remove redundant dired sort hook #1414
This still means dired will be unsorted for BSD ls users, but that's acceptable (for now).
This commit is contained in:
@ -262,6 +262,14 @@ original value of `symbol-file'."
|
||||
(doom|run-local-var-hooks)))
|
||||
(add-hook 'after-change-major-mode-hook #'doom|run-local-var-hooks-if-necessary)
|
||||
|
||||
(defun doom|create-non-existent-directories ()
|
||||
"Automatically create missing directories when creating new files."
|
||||
(let ((parent-directory (file-name-directory buffer-file-name)))
|
||||
(when (and (not (file-exists-p parent-directory))
|
||||
(y-or-n-p (format "Directory `%s' does not exist! Create it?" parent-directory)))
|
||||
(make-directory parent-directory t))))
|
||||
(add-hook 'find-file-not-found-functions #'doom|create-non-existent-directories)
|
||||
|
||||
|
||||
;;
|
||||
;;; Garbage collector optimizations
|
||||
|
Reference in New Issue
Block a user