[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: copy-word-from-line-above
From: |
Markus Triska |
Subject: |
Re: copy-word-from-line-above |
Date: |
Thu, 25 Jan 2007 21:13:25 +0100 |
"HS" <hugows@gmail.com> wrote:
> Hello!
> Thanks Triska!
> But your function would not copy symbols like '(' so I tried something,
> and think I just wrote my first defun :)
Cool; I changed "copy-region-as-kill-nomark" to "copy-region-as-kill"
to get it working. To preserve the kill ring, you can use:
(defun insert-word-above ()
(interactive)
(let (string beg end)
(save-excursion
(let ((col (current-column)))
(forward-line -1)
(move-to-column col))
(setq beg (point))
(forward-word)
(setq end (point)))
(insert (buffer-substring beg end))))
All the best,
Markus Triska
- Re: copy-word-from-line-above, (continued)
- Re: copy-word-from-line-above, Marc Tfardy, 2007/01/18
- Re: copy-word-from-line-above, rgb, 2007/01/19
- Re: copy-word-from-line-above, Greg Bognar, 2007/01/21
- Re: copy-word-from-line-above, rgb, 2007/01/21
- Re: copy-word-from-line-above, HS, 2007/01/22
- Re: copy-word-from-line-above, rgb, 2007/01/24
- Re: copy-word-from-line-above, HS, 2007/01/24
- Re: copy-word-from-line-above, Markus Triska, 2007/01/24
- Re: copy-word-from-line-above, HS, 2007/01/25
- Re: copy-word-from-line-above,
Markus Triska <=
- Re: copy-word-from-line-above, rgb, 2007/01/25