emacs-devel
[Top][All Lists]
Advanced

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

Re: How to handle both minor mode and major mode remapping a command?


From: Michael Heerdegen
Subject: Re: How to handle both minor mode and major mode remapping a command?
Date: Tue, 17 Dec 2024 18:33:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> I am wondering if there is some canonical way to handle similar scenarios
> recommended for major modes.
>
> Any suggestions?

Why not, as in similar situations, define a `kill-line-function'
variable with default value `kill-line-default-function' which is a
function (more or less our current `kill-line').

Any mode that wants to modify the behavior would `add-function' on that
variable binding.  We would have one single place where the thing is
controlled, while the behavior can still be modified by future modes.

`add-function' has priorities that can be used to specify which mode
should win in case of conflicts.


Michael.



reply via email to

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