all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: sandipchitale@yahoo.com (Sandip Chitale)
Subject: Re: Deleting all succeeding whitespace
Date: 25 Aug 2003 15:50:36 -0700	[thread overview]
Message-ID: <b607d812.0308251450.6d88f8bc@posting.google.com> (raw)
In-Reply-To: mailman.871.1061746115.29551.help-gnu-emacs@gnu.org

"Eric Bessette" <ebessette@qwest.net> wrote in message news:<mailman.871.1061746115.29551.help-gnu-emacs@gnu.org>...
> I'd like to have a key binding that deletes all of the whitespace after the
> current cursor position.  Is there a function in emacs that does this?  Can
> I create one, if so, I'd appreciate some help?
> 
> Thanks,
> Eric
I have this:

(defun delete-forward-backward-horizontal-space (arg)
  "Delete all spaces and tabs forward from point. With argument delete
all spaces and tabs backword."
  (interactive "*P")
  (let ((orig-pos (point)))
    (delete-region
     orig-pos
     (progn
       (if arg
           (skip-chars-backward " \t")
           (skip-chars-forward " \t"))
       (constrain-to-field nil orig-pos t)))))

(global-set-key [(meta ?\  )]              
'delete-forward-backward-horizontal-space)

  parent reply	other threads:[~2003-08-25 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.871.1061746115.29551.help-gnu-emacs@gnu.org>
2003-08-24 20:05 ` Deleting all succeeding whitespace Karl Pflästerer
2003-08-25 17:54   ` Kevin Rodgers
2003-08-25 22:50 ` Sandip Chitale [this message]
2003-08-24 16:30 Eric Bessette

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=b607d812.0308251450.6d88f8bc@posting.google.com \
    --to=sandipchitale@yahoo.com \
    /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.