changeset 92:a2f699e4f1ca

Make dired visit directories in the same buffer.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sun, 05 Oct 2014 18:52:34 -0400
parents 5e4d85c82723
children b3a21b2ec56a
files dotemacs.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dotemacs.el
+++ b/dotemacs.el
@@ -76,6 +76,12 @@
 ;; hit C-x C-f
 (global-unset-key (kbd "C-x f"))
 
+;; Make dired visit directory or file in the same buffer
+(put 'dired-find-alternate-file 'disabled nil)
+(add-hook 'dired-mode-hook
+          (lambda ()
+            (local-set-key (kbd "<RET>") 'dired-find-alternate-file)))
+
 (setq auto-mode-alist
       (append
        '(
@@ -267,7 +273,6 @@
  '(legalese-default-author "Jordi GutiƩrrez Hermoso")
  '(legalese-default-copyright "Jordi GutiƩrrez Hermoso <jordigh@octave.org>")
  '(make-backup-files nil)
- '(safe-local-variable-values (quote ((eval when (string-match "\\.in\\'" (buffer-file-name)) (html-mode)) (eval when (string-match "\\.h\\'" (buffer-file-name)) (unless (string-match "/gnulib/" (buffer-file-name)) (c++-mode) (c-set-style "gnu"))) (py-indent-offset . 4) (eval when (string-match "\\.h\\'" (buffer-file-name)) (c++-mode) (c-set-style "gnu")))))
  '(safe-local-variable-values (quote ((encoding . utf-8) (eval when (and (buffer-file-name) (string-match-p "\\.h\\'" (buffer-file-name)) (not (string-match-p "/gnulib/" (buffer-file-name)))) (c++-mode) (c-set-style "gnu")) (eval when (string-match "\\.in\\'" (buffer-file-name)) (html-mode)) (eval when (string-match "\\.h\\'" (buffer-file-name)) (unless (string-match "/gnulib/" (buffer-file-name)) (c++-mode) (c-set-style "gnu"))) (py-indent-offset . 4) (eval when (string-match "\\.h\\'" (buffer-file-name)) (c++-mode) (c-set-style "gnu")))))
  '(savehist-mode t nil (savehist))
  '(show-paren-mode t)