help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Standardize tab width variables across major modes


From: Andrew Pennebaker
Subject: Standardize tab width variables across major modes
Date: Tue, 30 Apr 2013 14:22:30 -0400

Many Emacs modes seem to obey tab-width, e.g. (setq-default tab-width 2). But a few modes define their own variables for this:

* _javascript_ https://github.com/mcandre/dotfiles/blob/master/.emacs#L251
* CSS https://github.com/mcandre/dotfiles/blob/master/.emacs#L252
* Python https://github.com/mcandre/dotfiles/blob/master/.emacs#L256
* Rust https://github.com/mcandre/dotfiles/blob/master/.emacs#L262
* Go https://github.com/mcandre/dotfiles/blob/master/.emacs#L266
* Erlang https://github.com/mcandre/dotfiles/blob/master/.emacs#L274
* Haskell https://github.com/mcandre/dotfiles/blob/master/.emacs#L277
* PostScript https://github.com/mcandre/dotfiles/blob/master/.emacs#L284
* Mozart/Oz https://github.com/mcandre/dotfiles/blob/master/.emacs#L287

Could we refactor these modes to use the standard variables tab-width, indent-tabs-mode, and sws-tab-width? We can maintain backwards compatibility by continuing to offer nonstandard variables like js-indent-level, by deriving them from the standard variables.

... could we refactor sws-mode to derive sws-tab-width from tab-width?

--
Cheers,

Andrew Pennebaker
www.yellosoft.us

reply via email to

[Prev in Thread] Current Thread [Next in Thread]