unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Siegfried Heintze" <siegfried@heintze.com>
Subject: Indenting code: C-M-\ v C-x C-q
Date: Tue, 11 Nov 2003 12:34:11 -0700	[thread overview]
Message-ID: <3fb13b2d@news.seqnet.net> (raw)

I accidently pasted an extra end brace in the middle of 3K lines of perl
code and spent 4 hours trying to find it! The first thing I did was try C-x
C-q to get it to indent my code so I could find the mismatching end brace.
This did not work!

Using C-x C-q works great for Java and other "Normal" languages that use
apostrophies and quotes for string literals but since perl allows me to use
qq[]  and qq|| for string literals I was not terribly surprised when C-x C-q
did not work for my perl code!  I figured that no one had gotten around to
accommodating the wierd syntax Perl allows for string literals.

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? Why do perl and elisp require C-M-\ and
everything else require C-x C-q? emacs drives me crazy sometimes.

             reply	other threads:[~2003-11-11 19:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-11 19:34 Siegfried Heintze [this message]
2003-11-11 20:26 ` Indenting code: C-M-\ v C-x C-q Stephen H. Westin
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=3fb13b2d@news.seqnet.net \
    --to=siegfried@heintze.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.
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).