[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: Daniel Martín
Subject: Re: Pushing the mark from a primitive like goto-char
Date: Tue, 05 Jan 2021 20:06:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

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

- Rebind 'M-g c' to 'goto-char-command'.

- Announce the new command.

What do you think? Could it break something? Thanks.

reply via email to

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