I have enable smart-tab mode as global minor mode by
(global-smart-tab-mode 1)
and want to disable it in eshell-mode,
(add-hook 'eshell-mode-hook
(lambda ()
(smart-tab-mode -1)))
but It seems not work and I’m sure this hook have been executed.
If I manually run (smart-tab-mode -1) in eshell, It is OK.
I don’t know why, could someone help me, thanks in advance!
I suppose the deactivation of the minor mode in
eshell-mode-hookand the activation caused byglobal-smart-tab-modeare called in the wrong order.Recent versions of smart-tab.el have a
smart-tab-disabled-major-modesvariable to which you could addeshell-mode, i.e.(add-to-list 'smart-tab-disabled-major-modes 'eshell-mode).