Hi,
I've stumbled on an issue when porting the go-mode (go-lang) to XEmacs
and needs some advice.
In the GNU code shell-command-on-region is called with 6
args. Actually the GNU version takes up to 7 args. (We don't have the
last two args. They are an error buffer, where output from stderr
goes, and a bool arg whether the error buffer should be displayed or
not. And yes, in my current solution I just ignore the separation of
stdout and stderr making the XEmacs version just slightly more user
unfriendly.)
One way of solving the issue for the go-mode is to sync our
shell-command-et-al-code with the GNU version. Maybe not that
difficult but there will be issues with asynchronous commands since we
use the background package for those. I guess we should go for
API-compatibility here so it ought to be a good thing, right?
On the other hand the functionality that is implemented is a call to
the program gofmt to reformat the current buffer and replace it. (Go
comes with a program that formats go code for you) This seems ideal to
call from call-process-region instead of using
shell-command-on-region!? (Am I missing something here, why fire of a
new shell just to run that process?)
To make things slightly worse it seems like GNUs call-process-region
is not compatible with ours so moving to call-process-region is only a
solution for XEmacs avoiding the missing features in our version of
shell-command-on-region.
Views, comments, appreciated!
Yours
--
%% Mats
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta