sexp.lisp: Option to omit a specific package prefix
- Linguagem predominante
- Common Lisp
- Estrelas
- 34
- Forks
- 7
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
The symbol package prefix can get really verbose at times, it'd be nice to have an option to omit it.
For instance
```lisp
(export '*local*)
(defvar *local-package* nil
"If `*local-package*' designates a package instance, don't print the package
prefix of its symbols.")
(defun print-symbol (symbol stream)
(let ((package (symbol-package symbol))
(name (prin1-to-string symbol)))
(cond ((eq package +cl-package+) (write-string "CL:" stream))
((eq package +keyword-package+) (write-char #\: stream))
((eq package *local-package*)
;; Don't print the package prefix.
nil)
(package (s-xml:print-string-xml (package-name package) stream)
(write-string "::" stream))
(t (write-string "#:" stream)))
(if (char= (char name (1- (length name))) #\|)
(write-string name stream :start (position #\| name))
(write-string name stream :start (1+ (or (position #\: name :from-end t) -1))))))
```
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
The issue is about modifying the symbol printing logic in sexp.lisp to optionally omit a specific package prefix. Start by examining the current print-symbol function and the proposed changes. Look for the definition of *local-package* and how it integrates. Test changes by running any existing tests related to symbol printing or serialization.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- lua
- Domínio
- cli
- Tipo de issue
- Funcionalidade
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100