From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: auto-indent in emacs Date: Mon, 30 Nov 2009 16:26:33 +0100 Organization: http://groups.google.com Message-ID: <87tywc9gpi.fsf@ergodik.univ-brest.fr> References: <6bd43112-0ffd-482a-be72-0cbb579ed1b8@o13g2000vbl.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259595712 18809 80.91.229.12 (30 Nov 2009 15:41:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 15:41:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 16:41:43 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NF8Nj-0006W2-2K for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 16:41:43 +0100 Original-Received: from localhost ([127.0.0.1]:46951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF8Ni-0005TQ-JG for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 10:41:42 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!feeder.erje.net!newsfeed.straub-nv.de!proxad.net!feeder1-2.proxad.net!u-picardie.fr!utc.fr!news.univ-lille1.fr!crihan.fr!news.univ-brest.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: mathw171.univ-brest.fr Original-X-Trace: news.univ-brest.fr 1259594916 1205 172.19.130.171 (30 Nov 2009 15:28:36 GMT) Original-X-Complaints-To: usenet@news.univ-brest.fr Original-NNTP-Posting-Date: 30 Nov 2009 15:28:36 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:IthB3XOuKMSZRenYcW+zvdVv5Y0= Original-Xref: news.stanford.edu gnu.emacs.help:175186 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70260 Archived-At: Kenneth Brun Nielsen 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? > > 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) C-c followed by a letter are user reserved bindings. And for indentation, have a look at http://www.emacswiki.org/emacs-en/CategoryIndentation