mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Fix make-custom-port in case encoding is #f
* module/ice-9/custom-ports.scm (make-custom-port): Code fails if (fluid-ref %default-port-encoding) returns #f. In fact this was the case why readline support on MSYS2 failed for guile 3.0.10, ref. https://github.com/msys2/MSYS2-packages/issues/5079 But later used canonicalize-encoding is prepared to handle #f for encoding. So allow encoding to also handle this case. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
25c9440e4d
commit
5abb24efe4
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@
|
|||
(id "custom-port")
|
||||
(print (make-default-print #:id id))
|
||||
(truncate default-truncate)
|
||||
(encoding (string->symbol (fluid-ref %default-port-encoding)))
|
||||
(encoding (and=> (fluid-ref %default-port-encoding) string->symbol))
|
||||
(conversion-strategy (fluid-ref %default-port-conversion-strategy))
|
||||
(close-on-gc? #f))
|
||||
"Create a custom port whose behavior is determined by the methods passed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue