[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing a function for a indented copy of a region
From: |
Decebal |
Subject: |
Re: Writing a function for a indented copy of a region |
Date: |
Wed, 17 Dec 2008 16:49:29 -0800 (PST) |
User-agent: |
G2/1.0 |
On 18 dec, 01:27, Andreas Politz <poli...@fh-trier.de> wrote:
> > Looking at your code I should replace:
> > (indent-rigidly (region-beginning) (region-end) indent)
> > (if do-kill
> > (kill-region (region-beginning) (region-end))
> > (copy-region-as-kill (region-beginning) (region-end))
> > (undo)
> > )
> > with:
> > (kill-new (replace-regexp-in-string
> > "^"
> > (format (format "%%%ds" indent) "")
> > (filter-buffer-substring (region-beginning) (region-
> > end) do-kill)
> > )
> > )
>
> > but then I get that filter-buffer-substring is void. What am I doing
> > wrong?
>
> You are using a undefined function ?
Looks like it yes. But
http://www.gnu.org/software/emacs/elisp/html_node/Buffer-Contents.html
says that the functions exists. ???
Re: Writing a function for a indented copy of a region, Decebal, 2008/12/17
Re: Writing a function for a indented copy of a region, Decebal, 2008/12/18