emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Nathan Collins <nathan.collins@gmail.com>,
	 emacs-orgmode@gnu.org, emacs-devel@gnu.org
Subject: Re: How to handle both minor mode and major mode remapping a command?
Date: Tue, 17 Dec 2024 18:33:00 +0100	[thread overview]
Message-ID: <8734imtdtf.fsf@web.de> (raw)
In-Reply-To: <87r0691asn.fsf@localhost> (Ihor Radchenko's message of "Sun, 15 Dec 2024 10:48:56 +0000")

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	other threads:[~2024-12-17 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18 11:53 Bug: org-kill-line shouldn't assume visual-line-mode means kill-visual-line Nathan Collins
2024-12-15 10:48 ` How to handle both minor mode and major mode remapping a command? (was: Bug: org-kill-line shouldn't assume visual-line-mode means kill-visual-line) Ihor Radchenko
2024-12-17 17:33   ` Michael Heerdegen [this message]

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=8734imtdtf.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=nathan.collins@gmail.com \
    --cc=yantar92@posteo.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).