[Top][All Lists]

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

Scheme-mode indentation problem

From: Fabrice Bauzac
Subject: Scheme-mode indentation problem
Date: Mon, 17 Feb 2003 03:59:16 +0100


In Scheme-mode, TAB and C-M-q indent sexps in different ways.

Here is a way to reproduce the problem:

$ emacs -q --no-site-file
create a new buffer: C-x b temp RET
switch to Scheme-mode: M-x scheme-mode RET
insert this:

(if #t <C-j>
     #t <C-j>
      #t) <C-j>

Now put the cursor at the beginning of the sexp (before the opening
parenthesis) and type C-M-q to indent it.  The result is:

(if #t

Now put the cursor somewhere in the third line and type TAB (to indent
it).  The result is:

(if #t

I don't know if any of these two indentations is right (I prefer
neither, see below) but I think that TAB and C-M-q should give the
same result.

I personally prefer when expressions are aligned:

(if #t

And for that to work, I use this:

(modify-syntax-entry ?# "_" scheme-mode-syntax-table)

In GNU Emacs (i686-pc-linux-gnu)
 of 2003-02-12 on noon.dnsalias.net
configured using `configure '--prefix=/home/noon/.prefix-emacs' '--with-gtk''

Important settings:
  value of $LC_ALL: fr_FR
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Recent input:
<return> ( i f SPC # t C-j # t C-j # t ) C-j M-> M-< 
C-M-q M-> C-p C-p C-p C-n C-n <tab> C-M-q C-a C-p C-p 
C-M-q M-> C-p C-p C-e ) C-a C-n C-k C-k M-> <backspace> 
C-a C-p C-M-q C-n <tab> <tab> M-> M-b <tab> <tab> C-p 
C-b <tab> C-b <tab> C-j <tab> C-n <tab> C-x u C-x u 
M-> <return> C-x m C-x k <return> M-x e m a <tab> b 
u <tab> C-a C-k b u g <tab> SPC SPC <backspace> <backspace> 
<backspace> r e p o <tab> t <backspace> r <tab> <r

Recent messages:
For information about the GNU Project and its goals, type C-h C-p.
Loading scheme...done
Mark set [6 times]
Undo! [2 times]
Mark set
Loading sendmail...done
Loading mailalias...done
Making completion list...
Loading help-mode...done
Loading emacsbug...done


fabrice bauzac
Software should be free.  http://www.gnu.org/philosophy/why-free.html

reply via email to

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