dwcoates / pygn-mode

An Emacs major-mode for chess PGN files, powered by Python
BSD 2-Clause "Simplified" License
10 stars 3 forks source link

Make comment-region work across arbitrary movetext positions in pygn-mode, including across lines #175

Closed rolandwalker closed 3 years ago

rolandwalker commented 3 years ago

With this PR, we get reliable integration with newcomment.el. The comment-region command will always enclose the region with a single pair of curly brackets.

~We can imagine an even nicer version of this function, which would comment lines with semicolons instead of curly brackets if the selected range was not within the movetext.~ Done. Comment-region will comment with semicolons instead of curly braces whenever the region is not exclusively in the movetext portion of the PGN.