all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: ypitrey <ypitrey@gmail.com>
Cc: Emacs-devel@gnu.org
Subject: Re: paragraph fill and arguments
Date: Fri, 20 Apr 2007 14:18:21 -0400	[thread overview]
Message-ID: <jwvy7km9aky.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <10094076.post@talk.nabble.com> (ypitrey@gmail.com's message of "Fri\, 20 Apr 2007 03\:06\:04 -0700 \(PDT\)")

> 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

  parent reply	other threads:[~2007-04-20 18:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 10:06 paragraph fill and arguments ypitrey
2007-04-20 14:40 ` martin rudalics
2007-04-20 17:17   ` Yohann Pitrey
2007-04-21 10:12     ` martin rudalics
2007-04-21 11:49       ` Andreas Schwab
2007-04-21 11:59         ` martin rudalics
2007-04-20 18:18 ` Stefan Monnier [this message]
2007-04-21 11:03   ` Yohann Pitrey
2007-04-22  8:10 ` Johan Bockgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy7km9aky.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=Emacs-devel@gnu.org \
    --cc=ypitrey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.