[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e5e4fa4 105/110: Add js2-mode-assume-strict custom variabl
From: |
Dmitry Gutov |
Subject: |
[elpa] master e5e4fa4 105/110: Add js2-mode-assume-strict custom variable |
Date: |
Thu, 23 Jun 2016 01:13:04 +0000 (UTC) |
branch: master
commit e5e4fa4120a35e2688655eb9346670ef25281cb1
Author: Stephen Hicks <address@hidden>
Commit: Stephen Hicks <address@hidden>
Add js2-mode-assume-strict custom variable
This allows all files to be parsed as if 'use strict' were on top of
every file, for the case of JS passed through compilers that assume
strict input.
Closes #341.
---
js2-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/js2-mode.el b/js2-mode.el
index 4d9bbf8..a46423e 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -277,6 +277,11 @@ end of the line, otherwise, at the beginning of the next
line."
:type 'boolean
:group 'js2-mode)
+(defcustom js2-mode-assume-strict nil
+ "Non-nil to start files in strict mode automatically."
+ :type 'boolean
+ :group 'js2-mode)
+
(defcustom js2-mode-show-strict-warnings t
"Non-nil to emit Ecma strict-mode warnings.
Some of the warnings can be individually disabled by other flags,
@@ -7988,7 +7993,7 @@ Scanner should be initialized."
js2-nesting-of-function 0
js2-labeled-stmt nil
js2-recorded-identifiers nil ; for js2-highlight
- js2-in-use-strict-directive nil)
+ js2-in-use-strict-directive js2-mode-assume-strict)
(while (/= (setq tt (js2-get-token)) js2-EOF)
(if (= tt js2-FUNCTION)
(progn
- [elpa] master 7b430a3 079/110: Merge pull request #308 from zmwangx/jsdoc-callback-func-method, (continued)
- [elpa] master 7b430a3 079/110: Merge pull request #308 from zmwangx/jsdoc-callback-func-method, Dmitry Gutov, 2016/06/22
- [elpa] master c988876 086/110: Fix the straggler, Dmitry Gutov, 2016/06/22
- [elpa] master 6399bec 001/110: Support ES(7) async/await syntax; Closes #185, Dmitry Gutov, 2016/06/22
- [elpa] master fa0aa09 060/110: Merge pull request #294 from lunaryorn/patch-1, Dmitry Gutov, 2016/06/22
- [elpa] master ec7932d 047/110: Merge pull request #283 from XeCycle/master-with-async, Dmitry Gutov, 2016/06/22
- [elpa] master e44d9e1 088/110: Merge pull request #325 from phst/all-tests, Dmitry Gutov, 2016/06/22
- [elpa] master 812df51 091/110: Merge pull request #326 from phst/compiler-warning-25, Dmitry Gutov, 2016/06/22
- [elpa] master de5b31c 085/110: Fix the tests broken in the previous commit, Dmitry Gutov, 2016/06/22
- [elpa] master f130121 095/110: Merge pull request #328 from XeCycle/iname-color, Dmitry Gutov, 2016/06/22
- [elpa] master 9586f45 096/110: Add :warnings-count keyword argument, Dmitry Gutov, 2016/06/22
- [elpa] master e5e4fa4 105/110: Add js2-mode-assume-strict custom variable,
Dmitry Gutov <=
- [elpa] master bb0acf5 106/110: Merge pull request #342 from shicks/strict, Dmitry Gutov, 2016/06/22
- [elpa] master 173d1c8 101/110: Merge pull request #332 from bolivier/master, Dmitry Gutov, 2016/06/22
- [elpa] master c162f35 092/110: Colorize contextual keywords as & from in import & export, Dmitry Gutov, 2016/06/22
- [elpa] master 66fe8de 107/110: js2-define-symbol: Treat const same as let, Dmitry Gutov, 2016/06/22
- [elpa] master 04f3d4b 110/110: Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode, Dmitry Gutov, 2016/06/22