[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill-region and white space
From: |
Kevin Rodgers |
Subject: |
Re: kill-region and white space |
Date: |
Tue, 31 Aug 2004 09:14:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
kgold wrote:
> I set mouse-3 to kill-region, and mouse-2 to mouse-yank-at-click. So
> I can cut and paste using only the mouse.
>
> mouse-1 double click selects a word, so I'd like to be able to select,
> cut, and paste a word using the mouse. However, the double click
> doesn't select the white space after the word. I grabbed this code for
> kill-word to do what I want. Is there something similar for mouse-1
> double click?
>
> (defadvice kill-word (after delete-horizontal-space activate)
> "Delete trailing whitespace as well."
> (if (looking-at "\\s ")
> (just-one-space)))
Why not advise kill-region similarly, since that's what you've bound
mouse-3 to?
--
Kevin Rodgers