unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: westin*nospam@graphics.cornell.edu (Stephen H. Westin)
Subject: Re: Indenting code: C-M-\ v C-x C-q
Date: 11 Nov 2003 15:26:50 -0500	[thread overview]
Message-ID: <uekwek5x1.fsf@graphics.cornell.edu> (raw)
In-Reply-To: 3fb13b2d@news.seqnet.net

"Siegfried Heintze" <siegfried@heintze.com> writes:

<snip>

> I just I happend to be poking around the www.Xemacs.com and noticed
> something about indenting perl code with C-M-\ and discovered it works great
> for indenting perl code in regular emacs too!
> 
> Oh -- the time I could have saved if I had known this!  Why are there two
> keys to do the same thing?

They don't. C-x C-q does a paragraph fill. With text, this means that
it takes the current paragraph (all the text surrounding the point and
between blank lines), treats it as a single line, then divides into
lines no wider than the fill column. C-M-\ indents programming code
within the currently selected region, without changing line breaks.

If writers of java-mode and such added auto indenting to "fill-paragraph",
I guess that's a nice extra feature.

<snip>

-- 
-Stephen H. Westin
Any information or opinions in this message are mine: they do not
represent the position of Cornell University or any of its sponsors.

  reply	other threads:[~2003-11-11 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-11 19:34 Indenting code: C-M-\ v C-x C-q Siegfried Heintze
2003-11-11 20:26 ` Stephen H. Westin [this message]
2003-11-11 21:44 ` Thien-Thi Nguyen
2003-11-11 23:03 ` Stefan Monnier
2003-11-14 21:06   ` Ole Laursen
2003-11-14 21:14     ` Ole Laursen
2003-11-14 21:55       ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=uekwek5x1.fsf@graphics.cornell.edu \
    --to=westin*nospam@graphics.cornell.edu \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).