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

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

Re: auto-indent in emacs


From: Sebastian Rose
Subject: Re: auto-indent in emacs
Date: Mon, 30 Nov 2009 17:48:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> On Mon, Nov 30, 2009 at 4:26 PM, harven <address@hidden> wrote:
>> Kenneth Brun Nielsen <address@hidden> writes:
>>
>>> I want to auto-indent a section (actually a whole file) in Emacs.
>>>
>>> I googled, that the shortcut C-M-\ ("CTRL+ALT+backspace") does the
>>> job, but since I have a danish keyboard, where "backspace" requires me
>>> to push the META-button "Alt Gr", it seems I'm not able to push this
>>> combination.
>>>
>>> Any suggestions for another way to auto-indent?


C-x h M-x indent-region RET

I have bound `indent-region' to <f5>.


>>> Best regards,
>>> Kenneth
>>
>> C-M-\ runs the command indent-region (check it by typing C-h k C-M-\).
>> So bind that command to another shortcut. For example, to bind it to C-c i
>> put the following line in your .emacs
>>
>> (global-set-key (kbd "C-c i") 'indent-region)
>
>
> Please see also the page http://www.emacswiki.org/emacs/AltGrKey for
> how to type C-M-\.


All those commands are unusable anyway for they're to difficult to type.
But four of those come with easier to type alternatives, which are not
mentioned there. Why?

C-M-@     =>   C-M-SPC
C-@       =>   C-SPC
C-x C-@   =>   C-x C-SPC
C-x r C-@ =>   C-x r SPC


Only backslash commands might be problem. They are not on none of my
(German) keyboards. I guess it's a problem of the underlying system
(Windows I guess). How about filing a bug report there?

Those commands are:

  `indent-region' has to be rebound (<f5> here).
  `set-input-method'
  `abort-recursive-edit'




I think http://www.emacswiki.org/emacs/AltGrKey is obsolete and should
be fixed.



  Sebastian




reply via email to

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