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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indenting code: C-M-\ v C-x C-q


From: Siegfried Heintze
Subject: Indenting code: C-M-\ v C-x C-q
Date: Tue, 11 Nov 2003 12:34:11 -0700

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 via email to

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