Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
4 answers
5k views

How can I create block (multiline) comments in Lisp code?

How can I do multiline / block comments in Lisp code - e.g. in the init.el. In Python I would do it like this """Block comment """ In C/C++ like this /* Block comment */ ...
buhtz's user avatar
  • 749
2 votes
2 answers
363 views

Is there a way to comment within a line in elisp?

Is it possible to comment the string "emacs" below while keeping this code one line? If so, how? (message "hi") "emacs" (message "hi!")
stacko's user avatar
  • 1,607
23 votes
1 answer
4k views

Emacs Lisp comment conventions

The Emacs Lisp Reference Manual's Appendix D.7 mentions some comment tips: Single semicolons (;) should be used for inline comments. Double semicolons (;;) should be used for line comments. Triple ...
Tianxiang Xiong's user avatar
9 votes
1 answer
729 views

Hide comment in current buffer

Is their a way to hide comment whatever the language used? Like if I'm in cpp mode all /* ... */ should be hide and if I'm on LaTeX mode, all % ... will be hide.
Romain Picot's user avatar
12 votes
3 answers
1k views

How can I detect if the current character is a comment character for that major mode?

I am working on this little function that pulls up the next line to the current line. I want to add a functionality so that if the current line is a line comment and the next line is also a line ...
Kaushal Modi's user avatar
13 votes
2 answers
2k views

Function to delete all comments from a buffer, without moving them to kill ring

I need to be able to remove all comments from a buffer from elisp code. For now, I am using: (goto-char (point-min)) (comment-kill (count-lines (point-min) (point-max))) However, comment-kill is an ...
T. Verron's user avatar
  • 4,323