From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sreekumar R Newsgroups: gmane.emacs.devel Subject: Comment/Uncomment not working as desired. Date: Fri, 2 Jul 2021 18:41:05 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e91eb605c623b0f2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11248"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 02 17:11:40 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lzKpP-0002fd-EO for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Jul 2021 17:11:39 +0200 Original-Received: from localhost ([::1]:58786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzKpO-0006HE-F6 for ged-emacs-devel@m.gmane-mx.org; Fri, 02 Jul 2021 11:11:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzIx3-0000Dt-85 for emacs-devel@gnu.org; Fri, 02 Jul 2021 09:11:25 -0400 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:43616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzIwy-00036f-Mp for emacs-devel@gnu.org; Fri, 02 Jul 2021 09:11:25 -0400 Original-Received: by mail-ej1-x62e.google.com with SMTP id v20so16023692eji.10 for ; Fri, 02 Jul 2021 06:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jz7f9Qt7dMaecBD32I2u/BvI1u126lC/L5SqaZtCwRY=; b=YDT8eWu0LrDEPYDpskoFr8bJHJIQXzfFP96IpTHOAAKBG22pgqoS5MTsbgxRpjtyyJ +ceD4GlNeGsKLL/g4IMQqpGt2efrT/JrizPHQ9LP/w/lrCbzNSZKCM75YD/7lWY0gUH3 ktA9Lm0IxTxjeVl+kofJME9DPYpqxwWkF01lg9+1wO7W2wkoDS8acmcQEIUqEIwvMn7l u+1Dzw3HYXsNtB21hPOTY4dMk9ldjWzDOZrUaiPyKSrkGrsWAVJ8qfOA6d1f+JDAsEJe LJTIHXyDtljejE0oYrhQqQAwd4aEq+J+XN3yFl2cTDTYcGXMBrUCorNNUhEfpyfSpXn9 BiSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jz7f9Qt7dMaecBD32I2u/BvI1u126lC/L5SqaZtCwRY=; b=LNqqw9g4tqSwAOe1mts1SjqIOuicgUzY5XqEN0NGp0OXoH6d6vmLd13lpWBRfEm87s 1KwZQTBqtnp5VaI/Z3n0+TDr0w0rvtNFwO8tVp9pGHhAPIOkSt05voSrCZWxJG3CzPxG kek+trGz153W/8cfgsf+69VeA0o+gGkuOyrrk8P2gRx1saG3IRgKr2JeJw7pgBW1ZUAV x9BXTbyRFAQQBjhtT9hznaECYI6O3EADn6MOWId7A426aeqHsL+6s1Zez6BvjP2Yxi5i qq8oIRVofNynvHXmGrREXRgUP8On5DqW0K9euR9xC2yLLJdrlx4qgm7TihmsJoqH8+5d jc9g== X-Gm-Message-State: AOAM5327gySiiov96I1XM2xjaYVHIcnU8xBJZURKXN/5NGGDuosNB1S7 ecPrOah1MW+GFILe4F5mk31enRx302OoiRVa8Y/2WOoE0Y0= X-Google-Smtp-Source: ABdhPJxcIMa7ZA4fK+9L2xKk+fKUoU7SPloHuJ7Hrlpzsl9MUZK/WPF8jhfE4yf605OTDqqCWalNKgMPi/xjw2y+ww0= X-Received: by 2002:a17:906:c247:: with SMTP id bl7mr5395831ejb.288.1625231477773; Fri, 02 Jul 2021 06:11:17 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=rudran.sreekumar@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 02 Jul 2021 11:10:13 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271106 Archived-At: --000000000000e91eb605c623b0f2 Content-Type: text/plain; charset="UTF-8" Hi, I am using M-; for commenting and uncommenting my code. Recently, when I was working on HTML page with JavaScript TAG, commenting the JavaScript code is working but not the other way. I posted it on Reddit and one user told that it is a bug and post in emacs-devel mailing list. He also suggested the below solution. (defun fix-js-mode-comment-start-skip () "newcomment.el expects comment delimiter text to begin at the end of the first \\(...\\) pair in `comment-start-skip`." (setq comment-start-skip "\\(\\)\\(//+\\|/\\*+\\)\\s *")) (with-eval-after-load 'js (add-hook 'js-mode-hook #'fix-js-mode-comment-start-skip)) regards, sree --000000000000e91eb605c623b0f2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=

I am using M-; for comme= nting and uncommenting my code.=C2=A0 Recently, when I was working on HTML = page with JavaScript TAG, commenting the JavaScript code is working but not= the other way.=C2=A0 I posted it on Reddit and one = user told that it is a bug and post in emacs-devel mailing list.

He also suggested the below solutio= n.
(defun fix-js-mode-comment-start-skip ()
  "newcomment.el expects comment delimiter text to begin at the
end of the first \\(...\\) pair in `comment-start-skip`."
  (setq comment-start-skip "\\(\\)\\(//+\\|/\\*+\\)\\s *"))

(with-eval-after-load 'js
  (add-hook 'js-mode-hook #'fix-js-mode-comment-start-skip))
regards,
sree=

--000000000000e91eb605c623b0f2--