GNU bug report logs - #26750
25.2; js-mode missing keywords

Previous Next

Package: emacs;

Reported by: Yuen Ho Wong <wyuenho <at> gmail.com>

Date: Tue, 2 May 2017 19:47:01 UTC

Severity: minor

Tags: confirmed

Merged with 31306

Found in versions 25.2, 27.0.50

Full log


Message #8 received at 26750 <at> debbugs.gnu.org (full text, mbox):

From: Ruslan Bekenev <furyinbox <at> gmail.com>
To: 26750 <at> debbugs.gnu.org
Subject: bug#26750 [PATCH] add missing keywords to js-mode
Date: Fri, 12 May 2017 14:12:32 +0300
[Message part 1 (text/plain, inline)]
Hi. It is my first contribution. 
I hope everything is correct with this PATCH and submission itself. 
In this patch added two missed keywords to `js--keyword-re` which are `as` and `of`. 
`async` and `await` are already there. 

---
 lisp/progmodes/js.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index bae9e52bf0..02e63986d6 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -278,11 +278,11 @@ Match group 1 is the name of the macro.")

 (defconst js--keyword-re
   (js--regexp-opt-symbol
-   '("abstract" "async" "await" "break" "case" "catch" "class" "const"
+   '("abstract" "as" "async" "await" "break" "case" "catch" "class" "const"
      "continue" "debugger" "default" "delete" "do" "else"
      "enum" "export" "extends" "final" "finally" "for"
      "function" "goto" "if" "implements" "import" "in"
-     "instanceof" "interface" "native" "new" "package"
+     "instanceof" "interface" "native" "new" "package" "of"
      "private" "protected" "public" "return" "static"
      "super" "switch" "synchronized" "throw"
      "throws" "transient" "try" "typeof" "var" "void" "let"
--

-- 
Ruslan Bekenev

[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.