Merge pull request #8958 from atom/wl-remove-hardcoded-makefile

Remove hardcoded Makefile tab behavior
This commit is contained in:
Wliu
2015-09-27 09:58:25 -04:00
3 changed files with 1 additions and 18 deletions

View File

@@ -127,7 +127,7 @@
"language-javascript": "0.96.0",
"language-json": "0.16.0",
"language-less": "0.28.2",
"language-make": "0.17.0",
"language-make": "0.18.0",
"language-mustache": "0.12.0",
"language-objective-c": "0.15.0",
"language-perl": "0.29.0",

View File

@@ -3684,19 +3684,6 @@ describe "TextEditor", ->
runs ->
expect(editor.softTabs).toBe false
it "uses hard tabs in Makefile files", ->
# FIXME remove once this is handled by a scoped setting in the
# language-make package
waitsForPromise ->
atom.packages.activatePackage('language-make')
waitsForPromise ->
atom.project.open('Makefile').then (o) -> editor = o
runs ->
expect(editor.softTabs).toBe false
describe "when editor.tabType is 'hard'", ->
beforeEach ->
atom.config.set('editor.tabType', 'hard')

View File

@@ -2344,10 +2344,6 @@ class TextEditor extends Model
# Returns a {Boolean} or undefined if no non-comment lines had leading
# whitespace.
usesSoftTabs: ->
# FIXME Remove once this can be specified as a scoped setting in the
# language-make package
return false if @getGrammar()?.scopeName is 'source.makefile'
for bufferRow in [0..@buffer.getLastRow()]
continue if @displayBuffer.tokenizedBuffer.tokenizedLineForRow(bufferRow).isComment()