From 056b5ceffce3d20b603567a8ce641ae8975f8d62 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 12 Aug 2015 14:36:41 +0300 Subject: emacs: Add 'guix-lint-checker-names'. * emacs/guix-main.scm: Use (guix scripts lint) module. (lint-checker-names): New procedure. * emacs/guix-base.el (guix-lint-checker-names): New function. --- emacs/guix-base.el | 9 ++++++++- emacs/guix-main.scm | 12 +++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/emacs/guix-base.el b/emacs/guix-base.el index 76974e12ab..daf15bf45b 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -1,6 +1,6 @@ ;;; guix-base.el --- Common definitions -*- lexical-binding: t -*- -;; Copyright © 2014 Alex Kost +;; Copyright © 2014, 2015 Alex Kost ;; This file is part of GNU Guix. @@ -180,6 +180,13 @@ If PATH is relative, it is considered to be relative to (guix-find-location loc) (message "Couldn't find package location.")))) + +;;; Receivable lists of packages, lint checkers, etc. + +(guix-memoized-defun guix-lint-checker-names () + "Return a list of names of available lint checkers." + (guix-eval-read (guix-make-guile-expression 'lint-checker-names))) + ;;; Buffers and auto updating. diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index e0dc683d88..2c5b0baa65 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Alex Kost +;;; Copyright © 2014, 2015 Alex Kost ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,6 +57,7 @@ (guix licenses) (guix utils) (guix ui) + (guix scripts lint) (guix scripts package) (guix scripts pull) (gnu packages)) @@ -927,3 +928,12 @@ (define* (package-source-build-derivation package-id #:key dry-run? (build-derivations store derivations)) (format #t "The source store path: ~a~%" (package-source-derivation->store-path derivation)))))) + + +;;; Lists of packages, lint checkers, etc. + +(define (lint-checker-names) + "Return a list of names of available lint checkers." + (map (lambda (checker) + (symbol->string (lint-checker-name checker))) + %checkers)) -- cgit v1.2.3