aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer/keymap.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-12-13 16:29:21 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-12-13 16:29:21 -0500
commit6dffced09ecda024e0884e352778c221ad066fd6 (patch)
tree1707e8d8df4d9c47317a39ab6abbfc2ca66a6c29 /gnu/installer/keymap.scm
parentb603554ed044638dd40b6863d5dada59eefe03b8 (diff)
parente3196755e60ba7f1ed9d432e73f26a85e0c8893c (diff)
downloadguix-6dffced09ecda024e0884e352778c221ad066fd6.tar
guix-6dffced09ecda024e0884e352778c221ad066fd6.tar.gz
Merge branch 'core-updates-frozen' into 'master'.
At last!
Diffstat (limited to 'gnu/installer/keymap.scm')
-rw-r--r--gnu/installer/keymap.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/gnu/installer/keymap.scm b/gnu/installer/keymap.scm
index c42b308009..83b65a0427 100644
--- a/gnu/installer/keymap.scm
+++ b/gnu/installer/keymap.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2018, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
@@ -79,6 +79,11 @@
"Parse FILE and return two values, the list of supported X11-KEYMAP-MODEL
and X11-KEYMAP-LAYOUT records. FILE is an XML file from the X Keyboard
Configuration Database, describing possible XKB configurations."
+ (define maybe-empty
+ (match-lambda
+ ((x) x)
+ (#f "")))
+
(define (model m)
(sxml-match m
[(model
@@ -108,7 +113,7 @@ Configuration Database, describing possible XKB configurations."
. ,rest-variant))
(x11-keymap-variant
(name name)
- (description (car
+ (description (maybe-empty
(assoc-ref rest-variant 'description))))]))
(define (layout l)
@@ -120,9 +125,9 @@ Configuration Database, describing possible XKB configurations."
(variantList ,[variant -> v] ...))
(x11-keymap-layout
(name name)
- (synopsis (car
+ (synopsis (maybe-empty
(assoc-ref rest-layout 'shortDescription)))
- (description (car
+ (description (maybe-empty
(assoc-ref rest-layout 'description)))
(variants (list v ...)))]
[(layout
@@ -131,9 +136,9 @@ Configuration Database, describing possible XKB configurations."
. ,rest-layout))
(x11-keymap-layout
(name name)
- (synopsis (car
+ (synopsis (maybe-empty
(assoc-ref rest-layout 'shortDescription)))
- (description (car
+ (description (maybe-empty
(assoc-ref rest-layout 'description)))
(variants '()))]))