help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kill-region and white space


From: kgold
Subject: kill-region and white space
Date: 30 Aug 2004 18:18:52 GMT

I post this periodically.   It's bothered me for years.

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)))


That is, with this line

        aaaaa bbbbb ccccc ddddd

Double click on the bbbbb, mounse-3, and mouse-2 before the ddddd
currently gives:

        aaaaa  ccccc bbbbbddddd
        

-- 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]