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

[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 <address@hidden> 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. ???


reply via email to

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