<p>I am using <a href="http://code.google.com/p/js2-mode/" rel="noreferrer">js2-mode</a> to edit Javascript in Emacs, but I can't seem to get it to stop using tabs instead of spaces for indentation. My other modes work fine, just having issues w/ js2.</p>

[{'answer_id': 46174, 'author': 'Peter S. Housel', 'author_id': 949, 'author_profile': 'https://Stackoverflow.com/users/949', 'pm_score': 6, 'selected': True, 'text': '<p>Do you have</p>\n\n<pre>\n(setq-default indent-tabs-mode nil)\n</pre>\n\n<p>in your .emacs? It works fine for me in emacs 23.0.60.1 when I do that. js2-mode uses the standard emacs function indent-to, which respects indent-tabs-mode, to do its indenting.</p>\n'}, {'answer_id': 7957258, 'author': 'john_fries', 'author_id': 998684, 'author_profile': 'https://Stackoverflow.com/users/998684', 'pm_score': 3, 'selected': False, 'text': "<p>Add this to your <code>.emacs</code> file somewhere after you load js2 mode:</p>\n\n<pre><code>(setq js2-mode-hook\n  '(lambda () (progn\n    (set-variable 'indent-tabs-mode nil))))\n</code></pre>\n"}, {'answer_id': 30416044, 'author': 'user1629060', 'author_id': 1629060, 'author_profile': 'https://Stackoverflow.com/users/1629060', 'pm_score': 3, 'selected': False, 'text': "<p>On my copy of GNU Emacs 24.2.1, setting:</p>\n\n<pre><code>(setq-default indent-tabs-mode nil)\n</code></pre>\n\n<p>in .emacs is not sufficient for javascript mode, presumably because the setting is somehow being over-ridden in a per-buffer context. The following change is sufficient:</p>\n\n<pre><code>(custom-set-variables\n ;; custom-set-variables was added by Custom.\n ;; If you edit it by hand, you could mess it up, so be careful.\n ;; Your init file should contain only one such instance.\n ;; If there is more than one, they won't work right.\n '(indent-tabs-mode nil))\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/45861', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4748/']