|
| From: | Marc Tfardy |
| Subject: | Re: problems with save-excursion |
| Date: | Thu, 09 Mar 2006 11:39:02 +0100 |
| User-agent: | Thunderbird 1.5 (Windows/20051201) |
address@hidden schrieb:
I have the following function:
(defun copy-line ()
(interactive)
(save-excursion
(beginning-of-line)
(set-mark-command)
(end-of-line)
(copy-region-as-kill)))
But it's not working...
It says:
save-excursion: Wrong number of arguments: #[(arg) ... (some trash)
Any clues?
You may try:
(defun copy-line ()
(interactive)
(save-excursion
(let (beg)
(beginning-of-line)
(setq beg (point))
(end-of-line)
(copy-region-as-kill beg (point)))))
regards
Marc
| [Prev in Thread] | Current Thread | [Next in Thread] |