From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Hungry delete in any mode
Date: Tue, 22 Jan 2008 03:37:38 -0800 (PST) [thread overview]
Message-ID: <16415dbc-3589-4a3f-a8c6-c25bb6a88ff0@p69g2000hsa.googlegroups.com> (raw)
In-Reply-To: d3e6c172-38f8-43d4-b9bb-bd66070a76e5@v4g2000hsf.googlegroups.com
I needed to restart Emacs in order for the changes to have effect.
This following code does it:
(define-minor-mode any-hungry-mode
"Toggle Hungry mode.
With no argument, this command toggles the mode.
Non-null prefix argument turns on the mode.
Null prefix argument turns off the mode.
When Hungry mode is enabled, the control delete key
gobbles all preceding whitespace except the last.
See the command \\[hungry-electric-delete]."
;; The initial value.
nil
;; The indicator for the mode line.
" Hungry"
;; The minor mode bindings.
'(([backspace]. c-hungry-delete-backwards) ;backspace
([delete] . c-hungry-delete-forward) ;delete
))
Thanks,
Nordlöw
next prev parent reply other threads:[~2008-01-22 11:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 17:32 Hungry delete in any mode Nordlöw
2008-01-22 2:36 ` Kevin Rodgers
[not found] ` <mailman.6393.1200969426.18990.help-gnu-emacs@gnu.org>
2008-01-22 8:42 ` Nordlöw
2008-01-22 11:37 ` Nordlöw [this message]
2008-01-23 15:35 ` Stefan Monnier
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=16415dbc-3589-4a3f-a8c6-c25bb6a88ff0@p69g2000hsa.googlegroups.com \
--to=per.nordlow@gmail.com \
--cc=help-gnu-emacs@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.