Replace comment-region by comment-or-uncomment-region
Closed this issue · 2 comments
christophe-gouel commented
Hi,
Would it be possible to replace comment-region
in what follows by comment-or-uncomment-region
? This would allow the same key binding to comment and uncomment.
;; `gams-comment-region' is aliased as `comment-region'.
(if (fboundp 'comment-region)
(fset 'gams-comment-region 'comment-region)
(fset 'gams-buffer-substring 'buffer-substring))
ShiroTakeda commented
I think that is a very good idea. I would like to adopt your suggestion. C-c C-;
is binded to gams-comment-or-uncomment-region which is an alias of
comment-or-uncomment-region`. Please try the following gams-mode.el file.
https://github.com/ShiroTakeda/gams-mode/blob/246c0bea5764e5d9d5607a1f76b4602109e66ba9/gams-mode.el
christophe-gouel commented
It works perfectly. Thanks a lot!