mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-04 11:10:27 +02:00
(format:error): Use 'format:format' instead of
'format' since the latter will lock the mutex again that we have already locked. (format:format-work): Flag multiple '#' as an error.
This commit is contained in:
parent
cdc5f67652
commit
8da867bfc6
1 changed files with 7 additions and 5 deletions
|
@ -112,7 +112,8 @@
|
|||
(let ((format-string (cadr format-args)))
|
||||
(if (not (zero? format:arg-pos))
|
||||
(set! format:arg-pos (- format:arg-pos 1)))
|
||||
(format port "~%FORMAT: error with call: (format ~a \"~a<===~a\" ~
|
||||
(format:format
|
||||
port "~%FORMAT: error with call: (format ~a \"~a<===~a\" ~
|
||||
~{~a ~}===>~{~a ~})~% "
|
||||
(car format:args)
|
||||
(substring format-string 0 format:pos)
|
||||
|
@ -120,10 +121,10 @@
|
|||
(string-length format-string))
|
||||
(list-head (cddr format:args) format:arg-pos)
|
||||
(list-tail (cddr format:args) format:arg-pos)))
|
||||
(format port
|
||||
"~%FORMAT: error with call: (format~{ ~a~})~% "
|
||||
format:args))
|
||||
(apply format port args)
|
||||
(format:format port
|
||||
"~%FORMAT: error with call: (format~{ ~a~})~% "
|
||||
format:args))
|
||||
(apply format:format port args)
|
||||
(newline port)
|
||||
(set! format:error format:error-save)
|
||||
(set! format:error-continuation error-continuation)
|
||||
|
@ -737,6 +738,7 @@
|
|||
(set! param-value-found #t)
|
||||
(tilde-dispatch))
|
||||
((#\#) ; Parameter is number of remaining args
|
||||
(if param-value-found (format:error "misplaced '#'"))
|
||||
(if modifier (format:error "misplaced modifier"))
|
||||
(set! params (append params (list (length (rest-args)))))
|
||||
(set! param-value-found #t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue