[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pushing the mark from a primitive like goto-char

From: Philipp Stephani
Subject: Re: Pushing the mark from a primitive like goto-char
Date: Tue, 5 Jan 2021 20:56:27 +0100

Am Di., 5. Jan. 2021 um 20:06 Uhr schrieb Daniel Martín <mardani29@yahoo.es>:
> martin rudalics <rudalics@gmx.at> writes:
> >>> I'd then try to make it behave like 'M-g g' in this regard.
> >>
> >> Some interactive versions of low-level primitives have the suffix
> >> `...-command' in their names, so a command like 'M-g g' and bound to
> >> 'M-g c' could be named 'goto-char-command'.
> >
> > I was more concerned about not pushing the mark when the region is
> > already active so one can use M-g c to extend the region.  BTW, is there
> > a reason why 'goto-map' is so terribly unpopulated?
> >
> This sounds like a good idea:
> - Create a 'goto-char-command' command in ELisp.
> - Move the interactive spec that is in 'goto-char' to this new command
>   and make it push the mark smartly (e.g. be careful when a region is
>   active).  Then call 'goto-char'.

There's no need the change goto-char; it can remain an interactive command.

> - Rebind 'M-g c' to 'goto-char-command'.
> - Announce the new command.
> What do you think? Could it break something? Thanks.

It will break users that expect the current behavior, so maybe there
should be a customization option that initially defaults to off.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]