From a8d3cbf75d219d7a249fc0623219511179e959da Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 25 May 2012 11:03:22 -0400 Subject: [PATCH] * lisp/progmodes/js.el: Add notes in comments. --- lisp/progmodes/js.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 1c8a1f45e57..cdc3ef1c2e0 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1646,6 +1646,11 @@ This performs fontification according to `js--class-styles'." (funcall (syntax-propertize-rules ;; Distinguish /-division from /-regexp chars (and from /-comment-starter). + ;; FIXME: Allow regexps after infix ops like + ... + ;; https://developer.mozilla.org/en/JavaScript/Reference/Operators + ;; We can probably just add +, -, !, <, >, %, ^, ~, |, &, ?, : at which + ;; point I think only * and / would be missing which could also be added, + ;; but need care to avoid affecting the // and */ comment markers. ("\\(?:^\\|[=([{,:;]\\)\\(?:[ \t]\\)*\\(/\\)[^/*]" (1 (ignore (forward-char -1) @@ -3324,7 +3329,7 @@ If one hasn't been set, or if it's stale, prompt for a new one." comment-start-skip "\\(//+\\|/\\*+\\)\\s *") (set (make-local-variable 'electric-indent-chars) - (append "{}():;," electric-indent-chars)) + (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". (set (make-local-variable 'electric-layout-rules) '((?\; . after) (?\{ . after) (?\} . before))) -- 2.39.2