[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Properly indenting a defun (sexp tips)
From: |
Dieter Wilhelm |
Subject: |
Re: Properly indenting a defun (sexp tips) |
Date: |
Mon, 16 Oct 2006 02:39:38 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Tim Johnson <tim@johnsons-web.com> 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