[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ELPA-diffs] elpa r407: js2-mode: Merge from upstream
From: |
Dmitry Gutov |
Subject: |
[ELPA-diffs] elpa r407: js2-mode: Merge from upstream |
Date: |
Sat, 08 Jun 2013 19:07:03 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 407
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: elpa
timestamp: Sat 2013-06-08 23:07:07 +0400
message:
js2-mode: Merge from upstream
Git commit 1c53de75e0acd19d61ad45a91b32c183948e5128
=== modified file 'packages/js2-mode/js2-mode.el'
--- a/packages/js2-mode/js2-mode.el 2013-05-10 16:11:33 +0000
+++ b/packages/js2-mode/js2-mode.el 2013-06-08 19:07:07 +0000
@@ -7,7 +7,7 @@
;; Dmitry Gutov <address@hidden>
;; URL: https://github.com/mooz/js2-mode/
;; http://code.google.com/p/js2-mode/
-;; Version: 20130510
+;; Version: 20130608
;; Keywords: languages, javascript
;; Package-Requires: ((emacs "24.1"))
@@ -854,7 +854,7 @@
You should probably do this by adding them to `js2-global-externs', which
is a global list used for all js2-mode files.
-Next, you can add a function to `js2-mode-hook' that adds additional
+Next, you can add a function to `js2-init-hook' that adds additional
externs appropriate for the specific file, perhaps based on its path.
These should go in `js2-additional-externs', which is buffer-local.
@@ -1093,11 +1093,19 @@
'((t :foreground "orange"))
"Face used to highlight undeclared variable identifiers.")
+(defcustom js2-init-hook nil
+ "List of functions to be called after `js2-mode' or
+`js2-minor-mode' has initialized all variables, before parsing
+the buffer for the first time."
+ :type 'hook
+ :group 'js2-mode
+ :version "20130608")
+
(defcustom js2-post-parse-callbacks nil
- "A list of callback functions invoked after parsing finishes.
+ "List of callback functions invoked after parsing finishes.
Currently, the main use for this function is to add synthetic
declarations to `js2-recorded-identifiers', which see."
- :type 'list
+ :type 'hook
:group 'js2-mode)
(defcustom js2-highlight-external-variables t
@@ -10112,6 +10120,7 @@
(add-hook 'change-major-mode-hook #'js2-minor-mode-exit nil t)
(when js2-include-jslint-globals
(add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
+ (run-hooks 'js2-init-hook)
(js2-reparse))
(defun js2-minor-mode-exit ()
@@ -10310,6 +10319,8 @@
(when js2-include-jslint-globals
(add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
+ (run-hooks 'js2-init-hook)
+
(js2-reparse))
(defun js2-mode-exit ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ELPA-diffs] elpa r407: js2-mode: Merge from upstream,
Dmitry Gutov <=