summary refs log tree commit diff
path: root/emacs/guix-messages.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-08-16 07:11:57 +0300
committerAlex Kost <alezost@gmail.com>2015-08-30 18:26:02 +0300
commit51dac383392a723aa77b0496cf12c593b013cb2b (patch)
tree25eb7bccd6d92235c25d54f31cded6eab4f4910d /emacs/guix-messages.el
parentd007d8a10cbc3100fe71b61add8eb7723a1c93e8 (diff)
downloadguix-51dac383392a723aa77b0496cf12c593b013cb2b.tar.gz
emacs: Add and use alist accessors.
* emacs/guix-utils.el (guix-define-alist-accessor): New macro.
  (guix-assq-value, guix-assoc-value): New functions.
  (guix-get-key-val): Remove.
* emacs/guix-base.el: Replace 'guix-get-key-val' with 'guix-assq-value'
  everywhere.
* emacs/guix-info.el: Likewise.
* emacs/guix-list.el: Likewise.
* emacs/guix-messages.el: Likewise.
Diffstat (limited to 'emacs/guix-messages.el')
-rw-r--r--emacs/guix-messages.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/emacs/guix-messages.el b/emacs/guix-messages.el
index bd985a0670..2bf99de6fa 100644
--- a/emacs/guix-messages.el
+++ b/emacs/guix-messages.el
@@ -1,6 +1,6 @@
 ;;; guix-messages.el --- Minibuffer messages
 
-;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
 
 ;; This file is part of GNU Guix.
 
@@ -186,14 +186,14 @@
 (defun guix-result-message (profile entries entry-type
                             search-type search-vals)
   "Display an appropriate message after displaying ENTRIES."
-  (let* ((type-spec (guix-get-key-val guix-messages
-                                      entry-type search-type))
+  (let* ((type-spec (guix-assq-value guix-messages
+                                     entry-type search-type))
          (fun-or-count-spec (car type-spec)))
     (if (functionp fun-or-count-spec)
         (funcall fun-or-count-spec profile entries search-vals)
       (let* ((count     (length entries))
              (count-key (if (> count 1) 'many count))
-             (msg-spec  (guix-get-key-val type-spec count-key))
+             (msg-spec  (guix-assq-value type-spec count-key))
              (msg       (car msg-spec))
              (args      (cdr msg-spec)))
         (mapc (lambda (subst)