views:

52

answers:

1

Hi,

I am writing a major-mode in emacs for a DSL I've created. I'm inheriting from fundamental-mode, which tabs out way far (6 tab stops, I think).

I'd like to be able to define:

(setq mydsl-tab-width 4) 

and have that work.

A: 

Not quite understanding the question...

In your major mode, I presume you're making some settings. Perhaps one of those could be:

(setq tab-width mydsl-tab-width)  ;# use the tab width specified by your variable

Could you elaborate on how mydsl-tab-width is currently used? Emacs surely doesn't know about it - tab-width is the variable to use/set.

Trey Jackson
Ah - that works. I wasn't sure how that interconnected. There's some interesting magic related to modes and autogeneratation, I've noticed.
Paul Nathan