(add-to-list 'load-path "~/.home/emacs/mode-hooks/")
(load-library "basic-mode-hooks")
+(load-library "dired-mode-hooks")
(load-library "nxml-mode-hooks")
(load-library "css-mode-hooks")
(load-library "ruby-mode-hooks")
--- /dev/null
+(defun dired-up-directory-in-same-buffer ()
+ ;; Open the parent directory, but do it in the current buffer.
+ (interactive)
+ (find-alternate-file "..")
+)
+
+(defun dm-hook()
+ ;; Redefine some functions so that dired will re-use the current
+ ;; buffer whenever possible.
+
+ ;; Was dired-advertised-find-file.
+ (define-key dired-mode-map (kbd "<return>") 'dired-find-alternate-file)
+
+ ;; Was dired-up-directory.
+ (define-key dired-mode-map (kbd "^") 'dired-up-directory-in-same-buffer)
+)
+
+(add-hook 'dired-mode-hook (function dm-hook))