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

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

Re: problems with save-excursion


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)

filcab@gmail.com 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



reply via email to

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