Date: Thu, 16 Feb 2023 14:51:09 +0200
Cc: emacs-devel@gnu.org
From: Dmitry Gutov <dgutov@yandex.ru>
We could at least discuss that, sure. Is there a list of
inconsistencies between those modes available anywhere?
From past discussions and looking at 'C-h m':
- "electric" behaviors: CC Mode's commands vs. electric-indent-mode and
electric-pair-mode.
- c-subword-mode vs subword-mode
- c-display-defun-name vs which-function-mode
- c-indent-exp vs prog-indent-sexp
- c-indent-defun/c-fill-paragraph vs prog-fill-reindent-defun
- c-indent-line-or-region vs indent-for-tab-command and indent-region.
These don't exist in c-ts-mode, with the single exception of the
electric behavior of '#' (which is a must in C).
Curious how c-indent-line-or-region doesn't mind depending on
transient-mark-mode being on.
It does:
(c-indent-line-or-region &optional ARG REGION)
Indent active region, current line, or block starting on this line.
In Transient Mark mode, when the region is active, reindent the region.
Otherwise, with a prefix argument, rigidly reindent the expression
starting on the current line.
Otherwise reindent just the current line.
The next question, of course, is how to go about reducing the
inconsistencies. What you proposed here is simply drop the
keybinding,
I also suggested, alternatively, that transient-mark-mode, when turned
off, creates a global binding for comment-region (also with 'C-c C-c').
I'm not sure this is a good idea. I'd rather we used the prefix
argument to M-; in some creative way, like if its value is zero or
negative.