From unknown Fri Aug 15 16:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26750: 25.2; js-mode missing keywords Resent-From: Yuen Ho Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 May 2017 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 26750@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14937543743585 (code B ref -1); Tue, 02 May 2017 19:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 May 2017 19:46:14 +0000 Received: from localhost ([127.0.0.1]:51552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5dkT-0000vl-KE for submit@debbugs.gnu.org; Tue, 02 May 2017 15:46:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5dPc-0000P6-Ag for submit@debbugs.gnu.org; Tue, 02 May 2017 15:24:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5dPW-0002fr-0n for submit@debbugs.gnu.org; Tue, 02 May 2017 15:24:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d5dPV-0002ff-TI for submit@debbugs.gnu.org; Tue, 02 May 2017 15:24:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5dPU-00033S-CX for bug-gnu-emacs@gnu.org; Tue, 02 May 2017 15:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5dPT-0002dM-0V for bug-gnu-emacs@gnu.org; Tue, 02 May 2017 15:24:32 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:38900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d5dPS-0002ce-PM for bug-gnu-emacs@gnu.org; Tue, 02 May 2017 15:24:30 -0400 Received: by mail-wm0-x230.google.com with SMTP id r190so32510314wme.1 for ; Tue, 02 May 2017 12:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=dvmVOIYTdFgToX2zm2os4+3r1ojIwiZaetFKaXanGL0=; b=Vvnf4fo0QJnFZdpyu1nkDgZmIeAnFxGRIdNDrFyHAVDuMgdTh5A86KWFnUZ1rnDgKp HqN+oyzBAueDVOIQ+pevRHjPWdVHmnKiiJYX2TFGpc6gUrnOzRsDZhFsy83b4atTMkIN qlI38o411TVMObqWVXfb9+2xX1tebortv1z3kg0qYaiddSRXTdeGQ5MWLmP0WOgfPLs0 IexJB3jsvyR59eiuE8PDM/qmaLLPSDVeGHGXkxkvrIQWPPTWoZ7nLrBW05l6P99219QF PBt9UFH7Ko1/l7flmG0I1geHPn+epPWLKvtqIW7+AWix4S7PVyWzmy+UPv/FNNyVjfkc mAgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=dvmVOIYTdFgToX2zm2os4+3r1ojIwiZaetFKaXanGL0=; b=X7uBQAms6JqHhIHi85eLR5qe088hBD9/N199LgcZt2m63RueMF+yHmxz0l51PZ0JqM zIQbuK3O7xQlE1mJBMJmZqnjlA5baJObcLiJqFGVXlMKFmOBBgT61ufRXSqnP/fWqBA8 2lAjgnqUlUtgx4sEDKQTvFHYvrYXkVx/n3O239XC6roJCnmhTVLOZlpcRS/pze4tkt96 dSak7Nnnb+Ql2MxhGFheqekPmAO2q89A3/wVtnmj3XK5qyJO2Lh3+N+wU56wyvvtPRoV TsmfksJMHO4Iiz+hQMkprGvOP6h174MMWkzsDSE6Ke8Do3iqQOwUhwUm8r+56+GZ//t+ QUaQ== X-Gm-Message-State: AN3rC/4udgSXXSciFrUbHVtNqG67iYAqwacb4YMKrfXCxvYvtK8qRcW5 2HCvrjMHbqts3mc8ax0= X-Received: by 10.28.20.84 with SMTP id 81mr3604503wmu.51.1493753069210; Tue, 02 May 2017 12:24:29 -0700 (PDT) Received: from ceremony-paternal-broken.local ([2a06:98c0:1000:8200:8086:4681:d37e:20f9]) by smtp.gmail.com with ESMTPSA id y6sm22989254wrc.51.2017.05.02.12.24.28 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 May 2017 12:24:28 -0700 (PDT) From: Yuen Ho Wong X-Google-Original-From: Yuen Ho Wong Date: Tue, 02 May 2017 20:23:44 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Tue, 02 May 2017 15:46:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When in js-mode, some latest Javascript keywords are not highlighted. After looking at js.el, js--keyword-re seems to be missing the following: "as", "await, "async", and "of". "await" is treated as a "future reserved word" in ES6 and promoted to a keyword in the latest ES8 spec draft. "async" is treated as a keyword in the AsyncFunctionExpression rule in ES8 draft. "of" is treated as a keyword in the for-of iteration production rule in ES6. "as" is treated as a keyword in import * as statements in ES6. References: ES6: https://www.ecma-international.org/ecma-262/6.0/ ES8: https://tc39.github.io/ecma262/ In GNU Emacs 25.2.1 (x86_64-apple-darwin16.4.0) of 2017-04-24 built on sierra.internal.macports.net Configured using: 'configure --prefix=/opt/local --without-ns --without-x --without-dbus --without-gconf --without-libotf --without-m17n-flt --without-gpm --without-gnutls --with-xml2 --with-modules --infodir /opt/local/share/info/emacs 'CFLAGS=-pipe -Os -arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie -arch x86_64'' Configured features: NOTIFY ACL LIBXML2 ZLIB MODULES Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils term/xterm xterm time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote kqueue multi-tty make-network-process emacs) Memory information: ((conses 16 84806 4043) (symbols 48 18787 0) (miscs 40 41 113) (strings 32 14158 5341) (string-bytes 1 408779) (vectors 16 9651) (vector-slots 8 378732 18240) (floats 8 149 126) (intervals 56 197 0) (buffers 976 19)) From unknown Fri Aug 15 16:57:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#26750: [PATCH] add missing keywords to js-mode References: In-Reply-To: Resent-From: Ruslan Bekenev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 May 2017 15:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 26750@debbugs.gnu.org Received: via spool by 26750-submit@debbugs.gnu.org id=B26750.149460351916544 (code B ref 26750); Fri, 12 May 2017 15:39:01 +0000 Received: (at 26750) by debbugs.gnu.org; 12 May 2017 15:38:39 +0000 Received: from localhost ([127.0.0.1]:41154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9CeN-0004Im-EE for submit@debbugs.gnu.org; Fri, 12 May 2017 11:38:39 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:35453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98Uy-0004Wy-Rg for 26750@debbugs.gnu.org; Fri, 12 May 2017 07:12:41 -0400 Received: by mail-wr0-f182.google.com with SMTP id z52so42159837wrc.2 for <26750@debbugs.gnu.org>; Fri, 12 May 2017 04:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version; bh=syKQU/ogAlsBVCm3gs5Igh6zaZW0fadDFRnl8UHOS10=; b=XXDyF9ahDBaw8pw5aCUGe9zt98hW/JJgVt96ErO95M3PeN1qrI32nUGE343MrdnEsw OOf/2BqBR4fWjJWIQ5BEuzsoI3Yq1yqmMkCKY+VZutsAwMfCuYwivLjcTMdl2kPCDi59 oPtbjU+gLwLoOaGpS4LOnC1DtHMrf5gAy4DoaqAXlq1Hlsd379LWdcmmblMbcE9WoUOQ XJHPxkT0+y0rLXbIINi6zOdcTDDCtVvEgRyMcFJj74MwkUTojxgIiZiZuhCGzR341J3a 86YRdxHqxITqzcToW2Kh3aXP5xlhnU1+vHyMiFVg0zEEHYH/Y0krrY5Dp7+EVrgHtn7G cj5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:message-id:subject:mime-version; bh=syKQU/ogAlsBVCm3gs5Igh6zaZW0fadDFRnl8UHOS10=; b=l+P75ESxob0BCR3dh7wUfdyypGV2030jBnAzFo09MC9lSbVS1ck92pIdTmjGFRmagv 8ZWkUWNjlrrNJuanfe389MK9UpaAfpep+oT+yPpmaG5v1lI+k5quYpoKX4VE2h9LnT9Q dy/uw8LCzk4xVrrrHgTSkIY29NlubyI/rFfC/NvonyYD8PZBudd7y7/BRTxvv1PE5ns2 hd0VBE8Bj3+yJx8u6UkWApLBkLDL928ZoxZfCuKFvG0A3spyoCmNOL6lDTopLnQ9JYkP ubZjrDiJesmqOq4prpTJWtnbtz2hNZpmh6rpB1YDj/GNsUoDWql5/QMqxEBCGUCQq7QF y2rw== X-Gm-Message-State: AODbwcCBV4ndEuTU4mOYirx+yY42X5HnD6BSIg7N0JA4vIFxbpZjQFFz 8xPmD4ZCYbTCiARk X-Received: by 10.46.13.1 with SMTP id 1mr957884ljn.134.1494587554819; Fri, 12 May 2017 04:12:34 -0700 (PDT) Received: from Ruslans-MacBook-Air.local.mail (broadband-skytelecom-185-52-28-15.clients.kubtel.ru. [185.52.28.15]) by smtp.gmail.com with ESMTPSA id f26sm520979lji.23.2017.05.12.04.12.33 for <26750@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 04:12:34 -0700 (PDT) Date: Fri, 12 May 2017 14:12:32 +0300 From: Ruslan Bekenev Message-ID: X-Mailer: Airmail (424) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="591598a0_2841737b_8ce6" X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Fri, 12 May 2017 11:38:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --591598a0_2841737b_8ce6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi. It is my first contribution.=C2=A0 I hope everything is correct with this PATCH and submission itself.=C2=A0= In this patch added two missed keywords to =60js--keyword-re=60 which are= =60as=60 and =60of=60.=C2=A0 =60async=60 and =60await=60 are already there.=C2=A0 --- =C2=A0lisp/progmodes/js.el =7C 4 ++-- =C2=A01 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 =40=40 -278,11 +278,11 =40=40 Match group 1 is the name of the macro.=22)= =C2=A0(defconst js--keyword-re =C2=A0 =C2=A0(js--regexp-opt-symbol - =C2=A0 '(=22abstract=22 =22async=22 =22await=22 =22break=22 =22case=22 = =22catch=22 =22class=22 =22const=22 + =C2=A0 '(=22abstract=22 =22as=22 =22async=22 =22await=22 =22break=22 =22= case=22 =22catch=22 =22class=22 =22const=22 =C2=A0 =C2=A0 =C2=A0 =22continue=22 =22debugger=22 =22default=22 =22delet= e=22 =22do=22 =22else=22 =C2=A0 =C2=A0 =C2=A0 =22enum=22 =22export=22 =22extends=22 =22final=22 =22= finally=22 =22for=22 =C2=A0 =C2=A0 =C2=A0 =22function=22 =22goto=22 =22if=22 =22implements=22 = =22import=22 =22in=22 - =C2=A0 =C2=A0 =22instanceof=22 =22interface=22 =22native=22 =22new=22 =22= package=22 + =C2=A0 =C2=A0 =22instanceof=22 =22interface=22 =22native=22 =22new=22 =22= package=22 =22of=22 =C2=A0 =C2=A0 =C2=A0 =22private=22 =22protected=22 =22public=22 =22return= =22 =22static=22 =C2=A0 =C2=A0 =C2=A0 =22super=22 =22switch=22 =22synchronized=22 =22throw= =22 =C2=A0 =C2=A0 =C2=A0 =22throws=22 =22transient=22 =22try=22 =22typeof=22 = =22var=22 =22void=22 =22let=22 -- --=C2=A0 Ruslan Bekenev --591598a0_2841737b_8ce6 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline