From: Eric B. <er...@co...> - 2005-07-13 16:34:58
|
On Wed, 2005-07-13 at 08:43 -0400, J. David Boyd wrote: > > Is there a way to set the tab width per style when defining new styles? > I've had this in my .emacs file for years, and it works for c-mode. This > might start you in the right direction. > > ;; Change the indentation amount to 3 spaces instead of 2. > ;; You have to do it in this complicated way because of the > ;; strange way the cc-mode initializes the value of `c-basic-offset'. > (add-hook 'c-mode-hook (lambda () (setq c-basic-offset 3))) That doesn't change your tab width, but rather the indentation amount. I have styles defined which use differing indentation values in the c- offsets-alist. I want to actually change the interpretation of tabs (i.e., the tab- width variable) per style within cc-mode. Cheers, Eric |