From fe4163f35141c4bc9c2c8ec7be19a0827c66841b Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 2 Aug 2014 20:01:48 -0400 Subject: gnu: Add paredit. * gnu/packages/emacs.scm (paredit): New variable. --- gnu/packages/emacs.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index fce6ff2f0f..7d91f94e62 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -23,6 +23,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages gtk) #:use-module (gnu packages ncurses) @@ -155,6 +156,50 @@ between the Scheme interpreter, Emacs and, ultimately, the schemer, giving her access to live metadata.") (license bsd-3))) +(define-public paredit + (package + (name "paredit") + (version "23") + (source (origin + (method url-fetch) + (uri (string-append "http://mumble.net/~campbell/emacs/paredit-" + version ".el")) + (sha256 + (base32 "1np882jzvxckljx3cjz4absyzmc5hw65cs21sjmbic82163m9lf8")))) + (build-system trivial-build-system) + (inputs `(("emacs" ,emacs))) + (arguments + `(#:modules ((guix build utils) + (guix build emacs-utils)) + #:builder + (begin + (use-modules (guix build utils)) + (use-modules (guix build emacs-utils)) + + (let* ((emacs (string-append (assoc-ref %build-inputs "emacs") + "/bin/emacs")) + (source (assoc-ref %build-inputs "source")) + (lisp-dir (string-append %output + "/share/emacs/site-lisp")) + (target (string-append lisp-dir "/paredit.el"))) + (mkdir-p lisp-dir) + (copy-file source target) + (with-directory-excursion lisp-dir + (parameterize ((%emacs emacs)) + (emacs-batch-eval '(byte-compile-file "paredit.el")))))))) + (home-page "http://mumble.net/~campbell/emacs/paredit/") + (synopsis "Emacs minor mode for editing parentheses") + (description + "ParEdit (paredit.el) is a minor mode for performing structured editing +of S-expression data. The typical example of this would be Lisp or Scheme +source code. + +ParEdit helps **keep parentheses balanced** and adds many keys for moving +S-expressions and moving around in S-expressions. Its behavior can be jarring +for those who may want transient periods of unbalanced parentheses, such as +when typing parentheses directly or commenting out code line by line.") + (license gpl3+))) + (define-public magit (package (name "magit") -- cgit v1.2.3