Frank Hrebabetzky <hreba@t-online.de> writes:
Are you sure, taking a look at the definition of markdown-mode
https://github.com/jrblevin/markdown-mode/blob/master/markdown-mode.el#L9585
it seems to explicitly set the tab-width to 4.
Sorry, you are right. What i tried was C-h tab-width, which tells
value 4 and original value 8, and contains a link "customize". This
leads to the customization window with an entry mask, but the actual
value there is 8. So I don't know how to set the effective value 4 to
8.
tab-width is a buffer-local variable, which means that it can have
different values for different buffers. As markdown-mode sets it with
setq, it sets the buffer-local value to 4, but the default remains as 8.
If you want to set tab-width to 8 everywhere, you could eval:
(setq-default tab-width 8) ;; This will set the *default* value of tab-width
And then, to override the buffer-local value set by markdown-mode:
(add-hook 'markdown-mode-hook (lambda ()
(setq tab-width 8)))
Hope this helps.