emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: Re: Pushing the mark from a primitive like goto-char
Date: Tue, 05 Jan 2021 14:19:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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

Actually, now that I think about it: do we really need a new command, or
can we instead arrange to do all the mark-handling from within the
interactive spec?


        Stefan




reply via email to

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