diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-11-19 17:37:24 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-12-02 00:02:13 +0100 |
commit | 4c8eea027a60d0be345770333dfda4c0d6230247 (patch) | |
tree | edfdf32031f273c360ceb591cc8de2d0183cb552 /gnu/home/services/xdg.scm | |
parent | cc9ee514e37f6ec74dd9cab91a13d51f7b8d47e7 (diff) | |
download | guix-4c8eea027a60d0be345770333dfda4c0d6230247.tar guix-4c8eea027a60d0be345770333dfda4c0d6230247.tar.gz |
home: services: Use 'match-record' instead of 'match'.
* gnu/home/services/mcron.scm (home-mcron-shepherd-services): Use
'match-record' instead of 'match'.
* gnu/home/services/shells.scm (home-bash-extensions): Likewise.
* gnu/home/services/xdg.scm (serialize-xdg-desktop-entry): Likewise.
Diffstat (limited to 'gnu/home/services/xdg.scm')
-rw-r--r-- | gnu/home/services/xdg.scm | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index eed765bdf5..865f8b81d7 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -397,25 +397,25 @@ configuration." (define (serialize-alist config) (generic-serialize-alist append format-config config)) - (define (serialize-xdg-desktop-action action) - (match action - (($ <xdg-desktop-action> action name config) - `(,(format #f "[Desktop Action ~a]\n" - (string-capitalize (maybe-object->string action))) - ,(format #f "Name=~a\n" name) - ,@(serialize-alist config))))) - - (match entry - (($ <xdg-desktop-entry> file name type config actions) - (list (if (string-suffix? file ".desktop") - file - (string-append file ".desktop")) - `("[Desktop Entry]\n" - ,(format #f "Name=~a\n" name) - ,(format #f "Type=~a\n" - (string-capitalize (symbol->string type))) - ,@(serialize-alist config) - ,@(append-map serialize-xdg-desktop-action actions)))))) + (define (serialize-xdg-desktop-action desktop-action) + (match-record desktop-action <xdg-desktop-action> + (action name config) + `(,(format #f "[Desktop Action ~a]\n" + (string-capitalize (maybe-object->string action))) + ,(format #f "Name=~a\n" name) + ,@(serialize-alist config)))) + + (match-record entry <xdg-desktop-entry> + (file name type config actions) + (list (if (string-suffix? file ".desktop") + file + (string-append file ".desktop")) + `("[Desktop Entry]\n" + ,(format #f "Name=~a\n" name) + ,(format #f "Type=~a\n" + (string-capitalize (symbol->string type))) + ,@(serialize-alist config) + ,@(append-map serialize-xdg-desktop-action actions))))) (define-configuration home-xdg-mime-applications-configuration (added |