aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/js.el5
1 files changed, 4 insertions, 1 deletions
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)))