* Comment/Uncomment not working as desired.
@ 2021-07-02 13:11 Sreekumar R
2021-07-02 16:43 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Sreekumar R @ 2021-07-02 13:11 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
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
<https://www.reddit.com/r/emacs/comments/objna2/m_not_working_for_javascript_code/>
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
[-- Attachment #2: Type: text/html, Size: 1467 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-02 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-02 13:11 Comment/Uncomment not working as desired Sreekumar R
2021-07-02 16:43 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.