unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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

* Re: Comment/Uncomment not working as desired.
  2021-07-02 13:11 Comment/Uncomment not working as desired Sreekumar R
@ 2021-07-02 16:43 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2021-07-02 16:43 UTC (permalink / raw)
  To: Sreekumar R; +Cc: emacs-devel

> and one user told that it is a bug and post in emacs-devel mailing list.

I think that user was right for the first part, but for the second you
might want to tell him that the right way to send a bug report is with
`M-x report-emacs-bug` (i.e. post to bug-gnu-emacs) rather than
emacs-devel.


        Stefan




^ 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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).