Eli Zaretskii writes: > In what version of Emacs do you see this? (You didn't include in your > report the information collected by "M-x report-emacs-bug", so I > cannot know what version and on what OS are you using.) I cannot > reproduce this in Emacs 29: "C-h m" after "M-x shell" shows > shell-dirtrack-mode only in the *shell* buffer. I do see it in > *scratch* in Emacs 28, so I guess we already fixed this? You are right about the steps to reproduce. What changed in Emacs 29 was describe-mode no longer using minor-mode-list, but (buffer-local-value 'local-minor-modes buffer) instead. This changed in commit 3c059f269e0182bd19df37871585e0b0bf1d47e5 Redo `C-h m' output Wed Apr 13 03:50:06 2022 +0200 This only hides the problem, which is: the default value of shell-dirtrack-mode being t. Revised steps to reproduce: 1. emacs -q 2. M-x shell 3. M-: shell-dirtrack-mode in *scratch* or *GNU Emacs* This is also demonstrated in the test shell-dirtrack-should-not-be-on-in-unrelated-modes from the first patch, which fails without the fix being applied. Attached is a revised patch for the fix, with the obsolete variable version filled in, and updated commit message. Thank you for looking at this. -- Vladimir Sedach