syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.66k stars 4.89k forks source link

load dired-x after loading dired other than use autoloading #16299

Closed xuan-w closed 6 months ago

xuan-w commented 7 months ago

dired-x used to be autoloaded with command dired-jump, which is the major entrance to dired in spacemacs. Now dired-jump was moved to dired.el so this autoloading is not needed for latest dired. However dired-x still provides additional key bindings such as "* ." to dired. To keep the old behavior, load dired-x after dired.

For users with older dired that dired-jump is in dired-x, we still need the auto loading to make sure dired-jump got loaded when we call it. That is because most of the dired functions have autoload and don't need manual specifying but dired-jump was defined in dired-x and got autoloaded only when dired.el got loaded, so when spacemacs provides "SPC f d" to dired-jump, at that moment, dired.el was not loaded yet, we need to make sure dired-x got loaded when we call.

resolves #16284