Tab-width not honored in multi major mode buffers?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nXhtml |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
Hi,
I am working in a large codebase which is all using 4-space tabs for indentation. I have added the following (based on your suggestion in question 102938), which sets the tab width for viewing, but indent-tabs-mode does not have any effect when I press TAB to indent code:
(defun tab-width-4 ()
(setq tab-width 4)
(setq indent-tabs-mode t))
(add-hook 'mumamo-
If I switch to a component mode (e.g. straight nxhtml-mode) there is no problem. I tried tracing down into mumamo-indent* but I got pretty confused as the indentation code is quite complex. It seems the problem may be that the variables are not being propagated into the mirror buffer; at least, if I evaluate tab-width and indent-tabs-mode in it, they are not as I expect (8 and nil). Is there a simple way to do this? I've been having to manually fix indentation issues for months now and I'm willing to try anything...
Thanks!
Changed in nxhtml: | |
status: | In Progress → Fix Committed |
Thanks for finding this, Riley. It looks like a bug so I am converting it to a bug report.
I have just updated mumamo-cmirr.el in the nXhtml repository so that it copies tab-width to the mirror buffer as you suggested. Can you please try it?