all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Christoph <cschol2112@googlemail.com>
Cc: emacs-devel@gnu.org
Subject: Re: hungry-delete in other modes
Date: Tue, 22 Feb 2011 20:48:28 -0500	[thread overview]
Message-ID: <jwvr5az1qfj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86k4grsfzm.fsf@gmail.com> (Christoph's message of "Tue, 22 Feb 2011 18:21:17 -0700")

> I really like the hungry-delete minor mode that cc-mode provides, so I
> would like to have it in other modes, specifically Python mode.

For DEL at least, you can

  (global-set-key [?\^?] 'backward-delete-char-untabify)

and even control it via buffer-local settings of
backward-delete-char-untabify-method.

> Is there any reason why hungry-delete mode (or subword mode or
> auto-newline mode for that matter) is so tightly coupled with cc-mode?

Because the CC-mode author wanted to provide the feature to all CC-mode
users and/or did not make the effort to try and submit this feature for
separate inclusion in Emacs.

> Would it be possible to decouple them and make the functionality
> available to other modes as a minor mode instead of them being just
> "minor-mode-like features" in cc-mode?

Of course it's possible.  As a matter of fact we do have subword-mode,
as well as electric-layout-mode.


        Stefan



  reply	other threads:[~2011-02-23  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23  1:21 hungry-delete in other modes Christoph
2011-02-23  1:48 ` Stefan Monnier [this message]
2011-02-23  2:23   ` Nathaniel Flath
2011-02-24  6:00     ` Christoph
2011-02-24  5:58   ` Christoph

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

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

  git send-email \
    --in-reply-to=jwvr5az1qfj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cschol2112@googlemail.com \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.