slight amendment to html_meta

Anne Ogborn <[email protected]> Sat, 10 May 2014 11:32:08 -0700 (PDT)
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
I've just debugged, for seemingly the hundredth time, a place where I wrote

:- html_meta  ajaxify(1, html). 
%%	ajaxify(+Generator:goal, +HTML:html, ?A:list, ?B:list) is det 
% 
%	ajaxify turns its contents into a div whose contents is 
%	replaced by the second argument, called in an ajax call, 
%	when signalled by ajax. 
% 
%	arguments for Generator 
% 
%	id(ID)      required - binds this handler to a specific ID. 
%	                       this will also be the id of the div 
%	                       note that this is a global namespace, so 
%	                       mypage_mything is recommended 
%      listen_to(Name)         listen to all, ID, and anything 
%                              that matches Name 
ajaxify(Generator, HTML) --> 


Sharper eyes than mine will immediately see the bug - the ajaxify predicate is a DCG,
so the html_meta should be 

:- html_meta ajaxify(1, html, ?, ?). 

Given the number of times I've made this mistake, and the slight mind warping that always ensues as you discover you're not getting the right module, I'm guessing I'm not alone here (annie hears crickets, suspects maybe she IS alone here, but it's not just html_meta she's alone with).  

Would it make sense to make a convenience declaration 

:- html_meta_dcg   axajify(1, html). 

that would do the right thing?