[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delete (kill) entire line at cursor - how?
From: |
Matthew Flaschen |
Subject: |
Re: Delete (kill) entire line at cursor - how? |
Date: |
Tue, 06 Mar 2007 18:05:43 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070104) |
cmr.Pent@gmail.com wrote:
>> I just made the below hack. Add it to your ~/.emacs file. Then, restart
>> emacs and, C-x y will do what you ask (I think). There's probably a
>> better way to do it:
>>
>> Matt Flaschen
>>
>> (defun kill-entire-line ()
>> "Kills the whole line, including terminating newline, and moves the
>> cursor directly down"
>> (interactive)
>> (next-line 1)
>> (save-excursion
>> (previous-line 1)
>> (beginning-of-line)
>> (kill-line 1)))
>>
>> (global-set-key [?\C-x ?y] 'kill-entire-line)
>
> Just checked it, works like a champ! Thanks.
Sure. :)
> And I use stable version (21.4 that is), so the `kill-whole-line'
> command is unavailable to me.
Same. I chose the name kill-entire-line because I did notice a
kill-whole-line variable (which still doesn't allow the kill-entire-line
behavior); it's good because there aren't conflicts on upgrade.
> Maybe it does exactly what Matt suggested ;-)
Quite possibly. That seems to happen a fair amount...
Matt Flaschen
- Delete (kill) entire line at cursor - how?, cmr . Pent, 2007/03/06
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/06
- Re: Delete (kill) entire line at cursor - how?, thorne, 2007/03/06
- Message not available
- Re: Delete (kill) entire line at cursor - how?, cmr . Pent, 2007/03/06
- Re: Delete (kill) entire line at cursor - how?, Giorgos Keramidas, 2007/03/06
- Re: Delete (kill) entire line at cursor - how?,
Matthew Flaschen <=
- Re: Delete (kill) entire line at cursor - how?, Dave Benjamin, 2007/03/07
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/07
- Message not available
- Re: Delete (kill) entire line at cursor - how?, cmr . Pent, 2007/03/07
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/07
- Re: Delete (kill) entire line at cursor - how?, anoop aryal, 2007/03/14
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/22
- Re: Delete (kill) entire line at cursor - how?, David Hansen, 2007/03/22
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/22
- Re: Delete (kill) entire line at cursor - how?, anoop aryal, 2007/03/26
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/26