/usr/share/jed/lib/untab.sl is in jed-common 1:0.99.19-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | % untabify region function
define untab_convert_to_tabs ()
{
variable c;
while (fsearch_char (' '))
{
c = what_column ();
push_mark ();
skip_white ();
c = what_column () - c;
if (c > 1)
{
del_region ();
whitespace (c);
}
else pop_mark_0 ();
}
}
%!%+
%\function{untab}
%\synopsis{untab}
%\usage{Void untab ();}
%\description
% This function may be used either to convert tabs to spaces or, if called
% with a prefix argument, it will perform the opposite conversion from
% spaces to tabs. This function operates on a region.
%!%-
define untab ()
{
check_region (0);
narrow ();
bob ();
if (-1 != prefix_argument (-1))
{
untab_convert_to_tabs ();
}
else
{
while (fsearch ("\t"))
{
TAB; % on stack
skip_white ();
what_column (); % on stack
bskip_chars ("\t ");
() - what_column (); % on stack
trim ();
TAB = 0;
whitespace (());
TAB = ();
}
}
widen ();
}
|