summary refs log tree commit diff
path: root/guix/import/utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/import/utils.scm')
-rw-r--r--guix/import/utils.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index e9a0a7ecd7..257570e95b 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2018, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2017, 2019, 2020, 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019, 2020, 2022, 2023 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
 ;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
@@ -335,14 +335,21 @@ LENGTH characters."
                    (cut string-trim-both <> #\')
                    ;; Escape single @ to prevent it from being understood as
                    ;; invalid Texinfo syntax.
-                   (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)))))
+                   (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)
+                   ;; Wrap camelCase or PascalCase words in @code{...}.
+                   (lambda (word)
+                     (let ((pattern (make-regexp "([A-Z][a-z]+[A-Z]|[a-z]+[A-Z])")))
+                       (match (list-matches pattern word)
+                         (() word)
+                         (_ (string-append "@code{" word "}")))))))))
          (words
           (string-tokenize (string-trim-both description)
                            (char-set-complement
                             (char-set #\space #\newline))))
          (new-words
           (match words
-            (((and (or "A" "Functions" "Methods") first) . rest)
+            (((and (or "A" "Classes" "Functions" "Methods" "Tools")
+                   first) . rest)
              (cons* "This" "package" "provides"
                     (string-downcase first) rest))
             (((and (or "Contains"
@@ -436,10 +443,7 @@ APPEND-VERSION?/string is a string, append this string."
   (match guix-package
     ((or
       ('package ('name name) ('version version) . rest)
-      ('package ('inherit ('simple-texlive-package name . _))
-                ('version version) . rest)
       ('let _ ('package ('name name) ('version version) . rest)))
-
      `(define-public ,(string->symbol
                        (cond
                         ((string? append-version?/string)