From 7ea20d9ce951ce6f522896a5e856406190aa3e4b Mon Sep 17 00:00:00 2001 From: Paulo Moura Date: Mon, 8 Nov 2021 22:00:02 +0000 Subject: [PATCH] Fix the format/2-3 predicates missing the numbervars(true) option in the ~w and ~q formats --- src/lib/format.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/format.pl b/src/lib/format.pl index db5eb48f..d2a2a78b 100644 --- a/src/lib/format.pl +++ b/src/lib/format.pl @@ -165,10 +165,10 @@ cells([], Args, Tab, Es, _) --> !, cells([~,~|Fs], Args, Tab, Es, VNs) --> !, cells(Fs, Args, Tab, [chars("~")|Es], VNs). cells([~,w|Fs], [Arg|Args], Tab, Es, VNs) --> !, - { write_term_to_chars(Arg, [variable_names(VNs)], Chars) }, + { write_term_to_chars(Arg, [numbervars(true),variable_names(VNs)], Chars) }, cells(Fs, Args, Tab, [chars(Chars)|Es], VNs). cells([~,q|Fs], [Arg|Args], Tab, Es, VNs) --> !, - { write_term_to_chars(Arg, [quoted(true),variable_names(VNs)], Chars) }, + { write_term_to_chars(Arg, [quoted(true),numbervars(true),variable_names(VNs)], Chars) }, cells(Fs, Args, Tab, [chars(Chars)|Es], VNs). cells([~,a|Fs], [Arg|Args], Tab, Es, VNs) --> !, { atom_chars(Arg, Chars) }, -- 2.54.0