[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: paragraph fill and arguments
From: |
Stefan Monnier |
Subject: |
Re: paragraph fill and arguments |
Date: |
Fri, 20 Apr 2007 14:18:21 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) |
> I a m trying to make my own fill paragraph command, which i want to be an
> equivalent of :
> 'M-x mark-paragraph'
> and then
> 'M-x fill-region-as-paragraph'
These are equivalent to
(command-execute 'mark-paragraph)
and
(command-execute 'fill-region-as-paragraph)
The `command-execute' function uses the `interactive' form inside the
command to build a list of arguments and then calls the function with
those arguments.
> (defun justify ()
> (interactive)
> (mark-paragraph)
> (fill-region-as-paragraph))
Here on the other hand, you directly call those commands as function, so if
you want to use this form, you need to pass them arguments "manually".
Stefan
Re: paragraph fill and arguments,
Stefan Monnier <=
Re: paragraph fill and arguments, Johan Bockgård, 2007/04/22