comment auto-wrap mode

Bug #1037454 reported by Andreas Roehler on 2012-08-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Wishlist
Andreas Roehler

Bug Description

http://stackoverflow.com/questions/11969442/comment-mode-in-emacs

I commonly program in languages that don't have any sort of block/multiline comment (e.g. python [#] and fortran [c or !].). Is there any way to define a minor mode in emacs that would allow me to enter multiline comments? By that I mean, it would cause emacs to wrap text automatically after X lines (say 72) and automatically prepend a comment character (taken from the current major mode) to the beginning of each line?

##########

You can use the following code:

(setq fill-column 72)
(setq comment-auto-fill-only-comments t)
(auto-fill-mode t)

This will wrap the text automatically, only for the comments, and will insert the comment character everytime it does a line break.

#########

as several variable have to be set at once, IMO it's worth a command toggling it.

Changed in python-mode:
importance: Undecided → Low
milestone: none → 6.0.12
assignee: nobody → Andreas Roehler (a-roehler)
status: New → Triaged
Changed in python-mode:
milestone: 6.0.12 → 6.1.0
Changed in python-mode:
milestone: 6.1.0 → 6.1.2
Changed in python-mode:
importance: Low → Wishlist
Changed in python-mode:
status: Triaged → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers