On Tue, Jan 5, 2016 at 11:17 PM, Ludovic Courtès <l...@gnu.org> wrote:
> Federico Beffa <be...@ieee.org> skribis:
>> +         (add-before 'install 'install-doc
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let* ((out (assoc-ref outputs "out"))
>> +                    (info-dir (string-append out "/share/info"))
>> +                    (doc-dir (string-append out "/share/doc/"
>> +                                            ,name "-" ,version))
>> +                    (doc-files '("doc/slime.pdf" "doc/slime-refcard.pdf"
>> +                                 "README.md" "NEWS" "PROBLEMS"
>> +                                 "CONTRIBUTING.md")))
>> +               (with-directory-excursion "doc"
>> +                 (substitute* "Makefile"
>> +                   (("infodir=/usr/local/info")
>> +                    (string-append "infodir=" info-dir)))
>> +                 (system* "make" "all")
>> +                 (install-file "slime.info" info-dir)
>> +                 (copy-recursively "html" (string-append doc-dir "/html")))
>> +               (for-each (lambda (f)
>> +                           (install-file f doc-dir)
>> +                           (delete-file f))
>> +                         doc-files)
>> +               (delete-file-recursively "doc")
>
> Can we build and install only Info files?  This is what we usually do
> for packages that have Texinfo manuals.  Incidentally, it allows us to
> get rid of the TeX Live dependency.

I'm OK to remove slime.pdf, but the slime-refcard.pdf is quite useful.
(See mit-scheme thread for my opinion on TeXLive.)

>
>> +    (synopsis
>> +     "Superior Lisp Interaction Mode for Emacs")
>
> Move to previous line.

OK. Note that this is coming straight out of Guile's 'pretty-print'...
that's Guile's developers style, not mine :-)

> Could you send an updated patch?

Attached.

Thanks for the review,
Fede
From a91182ee7d09c66a3f7b8f85b2ead4e282243d1a Mon Sep 17 00:00:00 2001
From: Federico Beffa <be...@fbengineering.ch>
Date: Wed, 30 Dec 2015 00:47:29 +0100
Subject: [PATCH 6/8] gnu: Add emacs-slime.

* gnu/packages/emacs.scm (emacs-slime): New variable.
---
 gnu/packages/emacs.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index d5f4a2b..913e973 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages texlive)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xorg)
@@ -1287,3 +1288,62 @@ identifiers in the MIT-Scheme documentation.")
      "This package provides functions for inserting the definition of natural
 constants and units into an Emacs buffer.")
     (license license:gpl2+)))
+
+(define-public emacs-slime
+  (package
+    (name "emacs-slime")
+    (version "2.15")
+    (source
+     (origin
+       (file-name (string-append name "-" version ".tar.gz"))
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/slime/slime/archive/v";
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0l2z6l2xm78mhh0nczkrmzh2ddb1n911ij9xb6q40zwvx4f8blds"))))
+    (build-system emacs-build-system)
+    (native-inputs
+     `(("texlive" ,texlive)
+       ("texinfo" ,texinfo)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'configure
+           (lambda* _
+             (emacs-substitute-variables "slime.el"
+               ("inferior-lisp-program" "sbcl"))
+             #t))
+         (add-before 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (info-dir (string-append out "/share/info"))
+                    (doc-dir (string-append out "/share/doc/"
+                                            ,name "-" ,version))
+                    (doc-files '("doc/slime-refcard.pdf"
+                                 "README.md" "NEWS" "PROBLEMS"
+                                 "CONTRIBUTING.md")))
+               (with-directory-excursion "doc"
+                 (substitute* "Makefile"
+                   (("infodir=/usr/local/info")
+                    (string-append "infodir=" info-dir)))
+                 (system* "make" "all")
+                 (install-file "slime.info" info-dir)
+                 (copy-recursively "html" (string-append doc-dir "/html")))
+               (for-each (lambda (f)
+                           (install-file f doc-dir)
+                           (delete-file f))
+                         doc-files)
+               (delete-file-recursively "doc")
+               #t))))))
+    (home-page "https://github.com/slime/slime";)
+    (synopsis "Superior Lisp Interaction Mode for Emacs")
+    (description
+     "SLIME extends Emacs with support for interactive programming in
+Common Lisp.  The features are centered around @{slime-mode}, an Emacs
+minor mode that complements the standard @{lisp-mode}.  While lisp-mode
+supports editing Lisp source files, @{slime-mode} adds support for
+interacting with a running Common Lisp process for compilation,
+debugging, documentation lookup, and so on.")
+    (license license:gpl2+)))
-- 
2.6.3

Reply via email to