[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OT Personal Memory failure] Can someone remind me how to formatcode
From: |
reader |
Subject: |
Re: [OT Personal Memory failure] Can someone remind me how to formatcode |
Date: |
Sat, 20 Oct 2007 21:25:53 -0500 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
"Drew Adams" <drew.adams@oracle.com> writes:
>> I know there is a keyboard command in emacs that will format a region
>> of some common kinds of code such as shell script, emacs lisp, perl
>> etc.
>> I recall having marked out a region then using some keyboard combo to
>> format it.
>>
>> M-x apropos RET format RET gives far to many confusion hits to find
>> what I want.
>
> If by "format" you mean reindent in a conventional way, then try `C-M-q'
> with the cursor at the beginning of a code section (e.g. defun in Lisp).
Thanks but having some trouble with that.
That does not appear for me under C-h b and search for C-M-q. What is
that command called?
C-h-c doesn't know about it here either.
When I just use the keys you mention it gets confused with a call to
KDE and brings up the KDE control application.
Going to a text console and trying C-M-q while editing a shell script
say C-M-q is not defined.
Trying M-x reindent<spc><spc> etc appears to bring the wrong thing as
well. `reindent-then-newline-and-indent'
Version:
GNU Emacs 22.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.10.7) of
2007-06-24 on reader