all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-29 b18754bb179: Minor improvements in c-ts-mode and docs
Date: Thu, 16 Feb 2023 17:38:54 +0200	[thread overview]
Message-ID: <f6bef572-6c8e-c118-5bd3-54346d9adfa8@yandex.ru> (raw)
In-Reply-To: <83ttzl3afs.fsf@gnu.org>

On 16/02/2023 17:19, Eli Zaretskii wrote:
>> 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).

Could it work by adding ?# to electric-indent-chars?

> So I think we are
> already there, no?

We are at a crossroads. I think. To the left lies the approach I 
described. To the right -- adding more stuff from CC Mode verbatim, 
simply because a lot of people are already used to it.

>> 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.

Does the description mean that using the prefix will force a "rigid 
reindentation" of the region?

>>> 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.

Could be a decent option. The meaning of C-u is already taken (to kill 
the comment), but 'C-u C-u' could do something different. As long as 
users with t-m-m=off think 'C-u C-u M-;' is a bearable substitute to 
'C-c C-c'.



  reply	other threads:[~2023-02-16 15:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167648414913.7595.16030168421819097011@vcs2.savannah.gnu.org>
     [not found] ` <20230215180229.75FF5C00613@vcs2.savannah.gnu.org>
2023-02-15 18:14   ` emacs-29 b18754bb179: Minor improvements in c-ts-mode and docs Dmitry Gutov
2023-02-15 18:31     ` Alan Mackenzie
2023-02-15 18:50       ` Dmitry Gutov
2023-02-15 19:37         ` Eli Zaretskii
2023-02-15 20:25           ` Dmitry Gutov
2023-02-16  7:09             ` Eli Zaretskii
2023-02-16 11:15               ` Dmitry Gutov
2023-02-16 12:01                 ` Eli Zaretskii
2023-02-15 19:44         ` Alan Mackenzie
2023-02-15 20:29           ` Dmitry Gutov
2023-02-16  7:11             ` Eli Zaretskii
2023-02-15 18:35     ` Eli Zaretskii
2023-02-15 18:53       ` Dmitry Gutov
2023-02-15 19:39         ` Eli Zaretskii
2023-02-15 20:32           ` Dmitry Gutov
2023-02-16  7:32             ` Eli Zaretskii
2023-02-16 11:17               ` Dmitry Gutov
2023-02-16 12:03                 ` Eli Zaretskii
2023-02-16 12:51                   ` Dmitry Gutov
2023-02-16 15:19                     ` Eli Zaretskii
2023-02-16 15:38                       ` Dmitry Gutov [this message]
2023-02-16 15:53                         ` Theodor Thornhill
2023-02-16 15:58                         ` Eli Zaretskii
2023-02-16 20:09                           ` Dmitry Gutov
2023-02-16 20:22                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6bef572-6c8e-c118-5bd3-54346d9adfa8@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.