mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 13:37:35 +02:00
package-author takes an optional arg to show email
This commit is contained in:
parent
99a1f55049
commit
6f8ba58642
2 changed files with 8 additions and 5 deletions
|
@ -1050,7 +1050,7 @@
|
||||||
(display " ") (display i)
|
(display " ") (display i)
|
||||||
(display " ") (display (package-name pkg))
|
(display " ") (display (package-name pkg))
|
||||||
(display " ") (display (package-version pkg))
|
(display " ") (display (package-version pkg))
|
||||||
(display " (") (display (package-author repo pkg))
|
(display " (") (display (package-author repo pkg #t))
|
||||||
(display ")\n")
|
(display ")\n")
|
||||||
(lp (cdr ls) (+ i 1)))))
|
(lp (cdr ls) (+ i 1)))))
|
||||||
(let ((n (input-number cfg 'candidate-number "Candidate number: "
|
(let ((n (input-number cfg 'candidate-number "Candidate number: "
|
||||||
|
|
|
@ -80,14 +80,17 @@
|
||||||
(and (pair? sig)
|
(and (pair? sig)
|
||||||
(assoc-get (cdr sig) 'email eq?)))))
|
(assoc-get (cdr sig) 'email eq?)))))
|
||||||
|
|
||||||
(define (package-author repo pkg)
|
(define (package-author repo pkg . o)
|
||||||
(and (package? pkg)
|
(and (package? pkg)
|
||||||
(let ((email (package-email pkg)))
|
(let ((email (package-email pkg))
|
||||||
|
(show-email? (and (pair? o) (car o))))
|
||||||
(or (cond
|
(or (cond
|
||||||
((repo-find-publisher repo email)
|
((repo-find-publisher repo email)
|
||||||
=> (lambda (pub)
|
=> (lambda (pub)
|
||||||
(string-append (or (assoc-get pub 'name) "")
|
(let ((name (assoc-get pub 'name)))
|
||||||
" <" (or email "") ">")))
|
(if (and name show-email?)
|
||||||
|
(string-append name " <" (or email "") ">")
|
||||||
|
(or name email "")))))
|
||||||
(else #f))
|
(else #f))
|
||||||
email))))
|
email))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue