From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: Properly indenting a defun (sexp tips) Date: Mon, 16 Oct 2006 02:39:38 +0200 Organization: The Church of Emacs Message-ID: <87u0253xh1.fsf@hans.local.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160959251 12481 80.91.229.2 (16 Oct 2006 00:40:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2006 00:40:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 02:40:47 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZGWi-0001aY-Rw for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Oct 2006 02:40:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZGWi-0006lR-66 for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Oct 2006 20:40:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZGWO-0006hG-0P for help-gnu-emacs@gnu.org; Sun, 15 Oct 2006 20:40:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZGWM-0006bP-1e for help-gnu-emacs@gnu.org; Sun, 15 Oct 2006 20:39:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZGWL-0006b3-OL for help-gnu-emacs@gnu.org; Sun, 15 Oct 2006 20:39:57 -0400 Original-Received: from [212.227.126.171] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GZGfM-00073l-2Q for help-gnu-emacs@gnu.org; Sun, 15 Oct 2006 20:49:16 -0400 Original-Received: from [84.167.60.2] (helo=duenenhof-wilhelm.de) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1GZGWC1SeH-0002kl; Mon, 16 Oct 2006 02:39:49 +0200 Original-Received: by duenenhof-wilhelm.de (Postfix, from userid 1000) id ED0C946AC4; Mon, 16 Oct 2006 02:39:38 +0200 (CEST) Original-To: tim@johnsons-web.com In-Reply-To: (Tim Johnson's message of "Sun\, 15 Oct 2006 22\:40\:53 -0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7ab225b98a136e1c2910381f940ecb9 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:38061 Archived-At: Tim Johnson writes: > I have a piece of code that looks like this: > ;; code: > (defun mu-modifier-char () > "Create colorized modifier symbol" > (interactive) > (let (my-char) > (save-excursion > (backward-char 1) > (setq my-char (char-at)) > (cond ((member my-char mu-modifiers) > (upcase my-char) > ) > ) > ))) > ;; And I want it to look like this > (defun mu-modifier-char () > "Create colorized modifier symbol" > (interactive) > (let (my-char) > (save-excursion > (backward-char 1) > (setq my-char (char-at)) > (cond ((member my-char mu-modifiers) > (upcase my-char)))))) > ;; that is, properly indented per emacs-lisp-mode > > Is there a single command to do this? Not exactly a single one but place your cursor in the last line of the defun and type 3 times M-^. -- Best wishes H. Dieter Wilhelm Darmstadt, Germany