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:
parent
3d53aa5dad
commit
75777756e1
3 changed files with 15 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue