aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/js.el5
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bca8d28b1a5..c7ad41a800b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12015-01-09 Daniel Colascione <dancol@dancol.org>
2
3 * progmodes/js.el (js--function-heading-1-re)
4 (js--function-prologue-beginning): Parse ES6 generator function
5 declarations. (That is, "function* name()").
6
12015-01-08 Stefan Monnier <monnier@iro.umontreal.ca> 72015-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * emacs-lisp/eieio.el (defclass): Move from eieio-defclass all the code 9 * emacs-lisp/eieio.el (defclass): Move from eieio-defclass all the code
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index de6a33988a4..c25e52cdc6a 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -248,7 +248,7 @@ name as matched contains
248 248
249(defconst js--function-heading-1-re 249(defconst js--function-heading-1-re
250 (concat 250 (concat
251 "^\\s-*function\\s-+\\(" js--name-re "\\)") 251 "^\\s-*function\\(?:\\s-\\|\\*\\)+\\(" js--name-re "\\)")
252 "Regexp matching the start of a JavaScript function header. 252 "Regexp matching the start of a JavaScript function header.
253Match group 1 is the name of the function.") 253Match group 1 is the name of the function.")
254 254
@@ -796,6 +796,9 @@ determined. Otherwise, return nil."
796 (let ((name t)) 796 (let ((name t))
797 (forward-word) 797 (forward-word)
798 (forward-comment most-positive-fixnum) 798 (forward-comment most-positive-fixnum)
799 (when (eq (char-after) ?*)
800 (forward-char)
801 (forward-comment most-positive-fixnum))
799 (when (looking-at js--name-re) 802 (when (looking-at js--name-re)
800 (setq name (match-string-no-properties 0)) 803 (setq name (match-string-no-properties 0))
801 (goto-char (match-end 0))) 804 (goto-char (match-end 0)))