Subject: bug#6799: 24.0.50; Please add dired-details.el to Emacs [patch]

From: Juri Linkov <[email-masked]>
Date: Sun, 17 Feb 2013 12:05:53 +0200

> Can you use `change-major-mode-hook' instead, to do this before
> changing the mode?  Is it possible at that point to test whether
> the target mode is (derived-mode-p dired-mode)?

Yes, it seems `change-major-mode-hook' is more suitable.
This is what `outline-mode' does to remove invisibility by using:

  (add-hook 'change-major-mode-hook 'show-all nil t)