[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with save-excursion
From: |
Mike Krell |
Subject: |
problem with save-excursion |
Date: |
Mon, 29 Jul 2002 08:56:59 -0700 (PDT) |
Hello,
I've written a little elisp function to run the current buffer
through perl (or any other command). However, the current region is
lost as a result of running the code, even though I'm using save-
excursion. Can anyone help with this?
Thanks,
Mike
defun perl-replace-buffer ()
"Apply perl command to buffer"
(interactive)
(save-excursion
(mark-whole-buffer)
(let ((start (region-beginning))
(end (region-end)))
(shell-command-on-region start end
(read-from-minibuffer "Command: " '("perl -pe \"\"" . 11 ))
t
t
)
)
)
)
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
- problem with save-excursion,
Mike Krell <=