unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: 10094@debbugs.gnu.org
Subject: bug#10094: 24.0.91; M-C-q indents LOOP wrong
Date: Mon, 21 Nov 2011 17:49:32 +0100	[thread overview]
Message-ID: <m262idh143.fsf@gmail.com> (raw)
In-Reply-To: <m3k46twjes.fsf@stories.gnus.org>

* Lars Magne Ingebrigtsen [2011-11-21 16:05] writes:

> If you use `common-lisp-indent-function', and you type in the following
> function (using TAB) to indent, you get the following:
>
> (defun foo ()
>   (loop for z from 1 upto 5
>      do (princ z)
>        (terpri)))
>
> If you then `M-C-q' to fill the function, you end up with this:       
>        
> (defun foo ()
>   (loop for z from 1 upto 5
>      do (princ z)
>      (terpri)))
>
> I've debugged this slightly, and the problem seems to be that
> `calculate-lisp-indent' is called to compute the indentation of the DO,
> but then isn't called to compute the indentation of the forms.
>
> I don't have time to debug this further right now, but unless anybody
> has an obvious solution to this, I'll try to fix this myself.

This is my fix for the problem:

(setq lisp-simple-loop-indentation 1)
(setq lisp-loop-keyword-indentation 6)
(setq lisp-loop-forms-indentation 6)

It's an old problem:

http://lists.gnu.org/archive/html/emacs-devel/2009-10/threads.html#00649

Helmut






  reply	other threads:[~2011-11-21 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 16:05 bug#10094: 24.0.91; M-C-q indents LOOP wrong Lars Magne Ingebrigtsen
2011-11-21 16:49 ` Helmut Eller [this message]
2011-11-21 18:24   ` Lars Magne Ingebrigtsen
2011-11-21 18:25   ` Lars Magne Ingebrigtsen
2011-11-21 18:52     ` Helmut Eller
2011-11-21 22:00 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m262idh143.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=10094@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).