[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: remove all the whitespace characters from the cursor to the next sym
From: |
alex_sv |
Subject: |
Re: remove all the whitespace characters from the cursor to the next symbol |
Date: |
Tue, 04 May 2010 15:42:34 -0000 |
User-agent: |
G2/1.0 |
On Mar 16, 5:56 am, Scott Frazer <frazer.sc...@gmail.com> wrote:
> On Mar 15, 10:43 am, alex_sv <avshaba...@gmail.com> wrote:
>
>
>
> > Hi all!
>
> > Could you please clarify - is it possible to remove all the whitespace
> > characters including newline from the current cursor position to the
> > next meaningful symbol using one command?
>
> > I mean if our buffer's content is as follows:
>
> > texttexttext{cursor}___
> > _
> > ___text
>
> > where '_' means space character, is it possible to press some known
> > key sequence to transform the given above to the following form:
>
> > texttexttext{cursor}text
>
> > Thanks in advance!
>
> (defun my-delete-whitespace-forward ()
> (interactive)
> (delete-region (point) (progn (skip-chars-forward " \t\n")
> (point))))
Thank you, this works fine!
I didn't wrote the function because I thought this would be a
reinvention of some known feature I am not aware of.