[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delete (kill) entire line at cursor - how?
From: |
cmr . Pent |
Subject: |
Re: Delete (kill) entire line at cursor - how? |
Date: |
6 Mar 2007 08:58:15 -0800 |
User-agent: |
G2/1.0 |
> 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.
And I use stable version (21.4 that is), so the `kill-whole-line'
command is unavailable to me.
Maybe it does exactly what Matt suggested ;-)
- 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 <=
- Re: Delete (kill) entire line at cursor - how?, Giorgos Keramidas, 2007/03/06
- Re: Delete (kill) entire line at cursor - how?, Matthew Flaschen, 2007/03/06
- 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