From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Deleting chunks of whitespace
Date: Sat, 16 Nov 2002 17:58:27 +0200 [thread overview]
Message-ID: <200211161558.gAGFwR6J003804@beta.mvs.co.il> (raw)
In-Reply-To: <u3cq2fsm7.fsf@bambecksystems.com> (rvmolen@bambecksystems.com)
On 15 Nov 2002 13:08:48 -0800, rvmolen@bambecksystems.com (Richard V. Molen) wrote:
>
> This is behavior is similar to alternating between M-SPC & M-d
> and then doing a C-k if at there's no more on the current line.
> Two exceptions being the: 1. the cursor doesn't move (not a big
> deal) 2. M-d would not cut all non-whitespace characters, but
> only alphanumeric strings.
I think this command will do what you want:
(defun kill-to-non-blank ()
"kill to 1st non blank (after blank) to right"
(interactive "*")
(kill-region (point) (progn (forward-to-non-blank) (point))))
(defun forward-to-non-blank ()
"go to 1st non blank (after blank) to right"
(interactive)
(if (re-search-forward "[ \t\n][^ \t\n]" (point-max) t)
(backward-char 1)))
I assign it to [C-delete] i.e.
(define-key global-map '[C-delete] 'kill-to-non-blank)
One hint: on some X-terminals the keypad delete is [C-kp-decimal].
Ehud.
--
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
next prev parent reply other threads:[~2002-11-16 15:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1037375498.29003.help-gnu-emacs@gnu.org>
2002-11-15 17:24 ` Deleting chunks of whitespace Richard V. Molen
2002-11-15 17:42 ` Benjamin Rutt
2002-11-15 18:22 ` Benjamin Lewis
2002-11-15 19:42 ` Richard V. Molen
2002-11-15 20:02 ` Benjamin Lewis
2002-11-15 21:08 ` Richard V. Molen
2002-11-16 15:58 ` Ehud Karni [this message]
[not found] ` <mailman.1037463184.24264.help-gnu-emacs@gnu.org>
2002-11-18 16:26 ` Richard V. Molen
2002-11-18 18:07 ` Ehud Karni
[not found] ` <mailman.1037643734.10691.help-gnu-emacs@gnu.org>
2002-11-18 18:55 ` Richard V. Molen
2002-11-16 18:54 ` Kai Großjohann
2002-11-15 17:42 Moore, Mathew L
-- strict thread matches above, loose matches on Subject: below --
2002-11-15 15:32 Moore, Mathew L
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=200211161558.gAGFwR6J003804@beta.mvs.co.il \
--to=ehud@unix.mvs.co.il \
--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.