From: Karol Skocik
Subject: how to enable paredit for slime REPL?
Date: 
Message-ID: <1185321825.666961.219180@g4g2000hsf.googlegroups.com>
Hi,
  I have found paredit and I like it quite a lot, but there is a
problem, that paredit mode does not work in slime REPL, and I don't
know how to make it work.

this is what I have in .emacs regarding paredit:

(add-to-list 'load-path "/usr/share/emacs/site-lisp/paredit")
(require 'paredit)
(mapc (lambda (mode)
        (let ((hook (intern (concat (symbol-name mode)
                                    "-mode-hook"))))
          (add-hook hook (lambda () (paredit-mode +1)))))
      '(emacs-lisp lisp inferior-lisp slime))

;; I have added this, but it does not work
(add-hook 'REPL (lambda () (paredit-mode +1)))

Can anybody help me to make paredit work in REPL as well? I have emacs
22.1 on gentoo x64, sbcl 1.0.6 if that matters.

Karol

From: Karol Skocik
Subject: Re: how to enable paredit for slime REPL?
Date: 
Message-ID: <1185322249.635410.166660@19g2000hsx.googlegroups.com>
On Jul 25, 2:03 am, Karol Skocik <············@gmail.com> wrote:
> Hi,
>   I have found paredit and I like it quite a lot, but there is a
> problem, that paredit mode does not work in slime REPL, and I don't
> know how to make it work.
>
> this is what I have in .emacs regarding paredit:
>
> (add-to-list 'load-path "/usr/share/emacs/site-lisp/paredit")
> (require 'paredit)
> (mapc (lambda (mode)
>         (let ((hook (intern (concat (symbol-name mode)
>                                     "-mode-hook"))))
>           (add-hook hook (lambda () (paredit-mode +1)))))
>       '(emacs-lisp lisp inferior-lisp slime))
>
> ;; I have added this, but it does not work
> (add-hook 'REPL (lambda () (paredit-mode +1)))
>
> Can anybody help me to make paredit work in REPL as well? I have emacs
> 22.1 on gentoo x64, sbcl 1.0.6 if that matters.
>
> Karol

forget about this, I have found it:

;; enable paredit in slime repl
(add-hook 'slime-repl-mode-hook (lambda () (paredit-mode +1)))
From: Mark Harrison
Subject: Re: how to enable paredit for slime REPL?
Date: 
Message-ID: <1185333094.097105.254230@w3g2000hsg.googlegroups.com>
On Jul 24, 8:10 pm, Karol Skocik <············@gmail.com> wrote:
> On Jul 25, 2:03 am, Karol Skocik <············@gmail.com> wrote:
>
>
>
> > Hi,
> >   I have found paredit and I like it quite a lot, but there is a
> > problem, that paredit mode does not work in slime REPL, and I don't
> > know how to make it work.
>
> > this is what I have in .emacs regarding paredit:
>
> > (add-to-list 'load-path "/usr/share/emacs/site-lisp/paredit")
> > (require 'paredit)
> > (mapc (lambda (mode)
> >         (let ((hook (intern (concat (symbol-name mode)
> >                                     "-mode-hook"))))
> >           (add-hook hook (lambda () (paredit-mode +1)))))
> >       '(emacs-lisp lisp inferior-lisp slime))
>
> > ;; I have added this, but it does not work
> > (add-hook 'REPL (lambda () (paredit-mode +1)))
>
> > Can anybody help me to make paredit work in REPL as well? I have emacs
> > 22.1 on gentoo x64, sbcl 1.0.6 if that matters.
>
> > Karol
>
> forget about this, I have found it:
>
> ;; enable paredit in slime repl
> (add-hook 'slime-repl-mode-hook (lambda () (paredit-mode +1)))

It looks like you could just add slime-repl to your list of modes to
enable paredit for. E.g.

(add-to-list 'load-path "/usr/share/emacs/site-lisp/paredit")
(require 'paredit)
(mapc (lambda (mode)
        (let ((hook (intern (concat (symbol-name mode)
                                    "-mode-hook"))))
          (add-hook hook (lambda () (paredit-mode +1)))))
      '(emacs-lisp lisp inferior-lisp slime slime-repl))

This is assuming the hook currently works for all of the other modes.

Mark