New question #181005 on nXhtml:
https://answers.launchpad.net/nxhtml/+question/181005

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-after-change-major-mode-hook 'tab-width-4 t)

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!

-- 
You received this question notification because you are a member of
nXhtml, which is an answer contact for nXhtml.

_______________________________________________
Mailing list: https://launchpad.net/~nxhtml
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~nxhtml
More help   : https://help.launchpad.net/ListHelp

Reply via email to