aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-utils.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guix-utils.el')
-rw-r--r--emacs/guix-utils.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs/guix-utils.el b/emacs/guix-utils.el
index 5a0cad4f2a..e24b58fb17 100644
--- a/emacs/guix-utils.el
+++ b/emacs/guix-utils.el
@@ -165,6 +165,15 @@ This function is similar to `shell-quote-argument', but less strict."
(replace-regexp-in-string
(rx (not (any alnum "-=,./\n"))) "\\\\\\&" argument))))
+(defun guix-symbol-title (symbol)
+ "Return SYMBOL's name, a string.
+This is like `symbol-name', but fancier."
+ (if (eq symbol 'id)
+ "ID"
+ (let ((str (replace-regexp-in-string "-" " " (symbol-name symbol))))
+ (concat (capitalize (substring str 0 1))
+ (substring str 1)))))
+
(defun guix-command-symbol (&optional args)
"Return symbol by concatenating 'guix' and ARGS (strings)."
(intern (guix-concat-strings (cons "guix" args) "-")))