[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Comment/Uncomment not working as desired.

From: Sreekumar R
Subject: Comment/Uncomment not working as desired.
Date: Fri, 2 Jul 2021 18:41:05 +0530


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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]