summaryrefslogtreecommitdiff
path: root/nongnu
diff options
context:
space:
mode:
authorZhu Zihao <all_but_last@163.com>2020-10-04 11:13:51 +0800
committerPierre Neidhardt <mail@ambrevar.xyz>2020-10-04 15:03:34 +0200
commit3783cf2b511138c132664fd5243fed2d9c7299fb (patch)
treeea8ed8fcc8842df77d38573a94397b98274a7fdd /nongnu
parent2c46dfd5ecbd5d34dcc07bb94c606b95ac31cd66 (diff)
nongnu: clhs: Polish clhs.
* nongnu/packages/emacs.scm(clhs)[arguments]<phases>: In replace-loader phase, Use format to generate sexp from list structure. Add autoload cookie for entry function. In install-doc phase, place HyperSpec under <output>/share/HyperSpec-7-0. Don't emit files outside the FHS structure. [source]: Use HTTPS. [description]: Wrap line at column 80.
Diffstat (limited to 'nongnu')
-rw-r--r--nongnu/packages/emacs.scm33
1 files changed, 16 insertions, 17 deletions
diff --git a/nongnu/packages/emacs.scm b/nongnu/packages/emacs.scm
index 3bdf79b..bc2b3b0 100644
--- a/nongnu/packages/emacs.scm
+++ b/nongnu/packages/emacs.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is not part of GNU Guix.
;;;
@@ -29,7 +30,7 @@
(source
(origin
(method url-fetch)
- (uri (string-append "http://beta.quicklisp.org/archive/clhs/2015-04-07/clhs-"
+ (uri (string-append "https://beta.quicklisp.org/archive/clhs/2015-04-07/clhs-"
version
".tgz"))
(sha256
@@ -42,27 +43,25 @@
(add-after 'unpack 'replace-loader
(lambda* (#:key inputs outputs #:allow-other-keys)
(delete-file "clhs-use-local.el")
- (with-output-to-file "clhs.el"
- (lambda ()
- (display
- (string-append
- "(defun clhs-setup ()
- (setq common-lisp-hyperspec-root
- \"file://"
- (string-append (assoc-ref outputs "out")
- "/HyperSpec-7-0/HyperSpec/")
- "\"))\n"
- "(provide 'clhs)"))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (hyperspec-dir (string-append out "/share/HyperSpec-7-0/")))
+ (with-output-to-file "clhs.el"
+ (lambda ()
+ (format #t ";;;###autoload~%~s~%~%~s"
+ `(defun clhs-setup ()
+ (setq common-lisp-hyperspec-root ,hyperspec-dir))
+ `(provide 'clhs)))))))
(add-after 'install 'install-doc
(lambda* (#:key inputs outputs #:allow-other-keys)
- (copy-recursively "HyperSpec-7-0"
- (string-append (assoc-ref outputs "out")
- "/HyperSpec-7-0")))))))
+ (let* ((out (assoc-ref outputs "out"))
+ (hyperspec-dir (string-append out "/share/HyperSpec-7-0/")))
+ (mkdir-p hyperspec-dir)
+ (copy-recursively "HyperSpec-7-0/HyperSpec" hyperspec-dir)))))))
(home-page "http://quickdocs.org/clhs/")
(synopsis "Offline Common Lisp HyperSpec")
(description
- "This package bundles the full Common Lisp HyperSpec ready for offline browsing.
-An Emacs package is provided for easy access. Load it with:
+ "This package bundles the full Common Lisp HyperSpec ready for offline
+browsing. An Emacs package is provided for easy access. Load it with:
@lisp
(require 'clhs)