unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Slime indentation and colour
@ 2007-07-14 13:32 Sard
  2007-07-15 16:39 ` Daniel Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Sard @ 2007-07-14 13:32 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using Emacs 21.4.1 and slime 2006-11-26.

When I type code in the relp it's indented automatically, but when I
type in a buffer of a file ending in .lisp who's buffer is in (Lisp
Slime) mode it doesn't.  How can I change this?

Also how do I enable color syntax highlighting?

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Slime indentation and colour
  2007-07-14 13:32 Slime indentation and colour Sard
@ 2007-07-15 16:39 ` Daniel Jensen
  2007-07-16  2:08   ` weber
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jensen @ 2007-07-15 16:39 UTC (permalink / raw)
  To: help-gnu-emacs

Sard <Sardaukary@gmail.com> writes:

> When I type code in the relp it's indented automatically, but when I
> type in a buffer of a file ending in .lisp who's buffer is in (Lisp
> Slime) mode it doesn't.  How can I change this?

Add the following to your init file.

(add-hook 'lisp-mode-hook
          (lambda ()
            (local-set-key (kbd "RET") 'newline-and-indent)))

> Also how do I enable color syntax highlighting?

(global-font-lock-mode 1)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Slime indentation and colour
  2007-07-15 16:39 ` Daniel Jensen
@ 2007-07-16  2:08   ` weber
  2007-07-16 12:37     ` Daniel Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: weber @ 2007-07-16  2:08 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 15, 1:39 pm, dan...@bigwalter.net (Daniel Jensen) wrote:
> Sard <Sardauk...@gmail.com> writes:
> > When I type code in the relp it's indented automatically, but when I
> > type in a buffer of a file ending in .lisp who's buffer is in (Lisp
> > Slime) mode it doesn't.  How can I change this?
>
> Add the following to your init file.
>
> (add-hook 'lisp-mode-hook
>           (lambda ()
>             (local-set-key (kbd "RET") 'newline-and-indent)))
>
> > Also how do I enable color syntax highlighting?
>
> (global-font-lock-mode 1)

Well, I had some problem with that exact key binding.

The problem is that when I set lisp-mode-map, my [ret] would also be
bound on *slime-repl*, and my expressions would not get evaluated!
I think you need [ret] to be bound to slime-repl-return in the REPL...

So I found out that its better to use slime-mode-map for keybinding
relative to editing .lisp files, and slime-repl-mode-map to
keybindings related to the repl.

Please correct me if I'm wrong, since I found that out by trial-and-
error.

Regards,
weber

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Slime indentation and colour
  2007-07-16  2:08   ` weber
@ 2007-07-16 12:37     ` Daniel Jensen
  2007-07-16 12:51       ` weber
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jensen @ 2007-07-16 12:37 UTC (permalink / raw)
  To: help-gnu-emacs

weber <hugows@gmail.com> writes:

> On Jul 15, 1:39 pm, dan...@bigwalter.net (Daniel Jensen) wrote:
>
>> (add-hook 'lisp-mode-hook
>>           (lambda ()
>>             (local-set-key (kbd "RET") 'newline-and-indent)))
>
> Well, I had some problem with that exact key binding.
>
> The problem is that when I set lisp-mode-map, my [ret] would also be
> bound on *slime-repl*, and my expressions would not get evaluated!
> I think you need [ret] to be bound to slime-repl-return in the REPL...

That sounds strange to me. The REPL should not be in Lisp mode or use
that keymap. (My SLIME version is 2007-05-17.)

> So I found out that its better to use slime-mode-map for keybinding
> relative to editing .lisp files, and slime-repl-mode-map to
> keybindings related to the repl.

I don't think that's a good idea. Slime mode is also used for buffers
that are not Lisp (e.g., the apropos buffer.)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Slime indentation and colour
  2007-07-16 12:37     ` Daniel Jensen
@ 2007-07-16 12:51       ` weber
  2007-07-16 12:59         ` Daniel Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: weber @ 2007-07-16 12:51 UTC (permalink / raw)
  To: help-gnu-emacs

On 16 jul, 09:37, dan...@bigwalter.net (Daniel Jensen) wrote:
> weber <hug...@gmail.com> writes:
> > On Jul 15, 1:39 pm, dan...@bigwalter.net (Daniel Jensen) wrote:
>
> >> (add-hook 'lisp-mode-hook
> >>           (lambda ()
> >>             (local-set-key (kbd "RET") 'newline-and-indent)))
>
> > Well, I had some problem with that exact key binding.
>
> > The problem is that when I set lisp-mode-map, my [ret] would also be
> > bound on *slime-repl*, and my expressions would not get evaluated!
> > I think you need [ret] to be bound to slime-repl-return in the REPL...
>
> That sounds strange to me. The REPL should not be in Lisp mode or use
> that keymap. (My SLIME version is 2007-05-17.)
>
> > So I found out that its better to use slime-mode-map for keybinding
> > relative to editing .lisp files, and slime-repl-mode-map to
> > keybindings related to the repl.
>
> I don't think that's a good idea. Slime mode is also used for buffers
> that are not Lisp (e.g., the apropos buffer.)

Hmm that sucks.
How could I change the slime REPL to be no another mode ?
Thanks in advance,
-weber

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Slime indentation and colour
  2007-07-16 12:51       ` weber
@ 2007-07-16 12:59         ` Daniel Jensen
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jensen @ 2007-07-16 12:59 UTC (permalink / raw)
  To: help-gnu-emacs

weber <hugows@gmail.com> writes:

> How could I change the slime REPL to be no another mode ?

Get the latest SLIME. If it fails, try to locate what is causing this.
Check your slime-repl-mode-hook. It could be something you put in your
init file, so start emacs with -Q and go from there.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-16 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-14 13:32 Slime indentation and colour Sard
2007-07-15 16:39 ` Daniel Jensen
2007-07-16  2:08   ` weber
2007-07-16 12:37     ` Daniel Jensen
2007-07-16 12:51       ` weber
2007-07-16 12:59         ` Daniel Jensen

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).