emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master bb0acf5 106/110: Merge pull request #342 from shicks/stric


From: Dmitry Gutov
Subject: [elpa] master bb0acf5 106/110: Merge pull request #342 from shicks/strict
Date: Thu, 23 Jun 2016 01:13:04 +0000 (UTC)

branch: master
commit bb0acf5972e8ff505cb37a38ea9edf11cb1bd741
Merge: bc46db5 e5e4fa4
Author: Dmitry Gutov <address@hidden>
Commit: GitHub <address@hidden>

    Merge pull request #342 from shicks/strict
    
    Add js2-mode-assume-strict custom variable.
---
 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



reply via email to

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