lisp-modules: replace "_" in package names with "__" for reversibility

This commit is contained in:
Kasper Gałkowski 2023-03-10 19:20:18 +01:00
parent efe902542a
commit a0bdaf345b
3 changed files with 366 additions and 365 deletions

View file

@ -129,6 +129,7 @@ During Quicklisp import:
- `+` in names are converted to `_plus{_,}`: `cl+ssl`->`cl_plus_ssl`, `alexandria+`->`alexandria_plus`
- `.` to `_dot_`: `iolib.base`->`iolib_dot_base`
- names starting with a number have a `_` prepended (`3d-vectors`->`_3d-vectors`)
- `_` in names is converted to `__` for reversibility
## Defining packages manually inside Nixpkgs

View file

@ -41,8 +41,8 @@
(defun nixify-symbol (string)
(flet ((fix-special-chars (str)
(replace-regexes '("[+]$" "[+][/]" "[+]" "[.]" "[/]")
'("_plus" "_plus/" "_plus_" "_dot_" "_slash_")
(replace-regexes '("[_]" "[+]$" "[+][/]" "[+]" "[.]" "[/]")
'("__" "_plus" "_plus/" "_plus_" "_dot_" "_slash_")
str)))
(if (ppcre:scan "^[0-9]" string)
(str:concat "_" (fix-special-chars string))

File diff suppressed because it is too large Load diff