jed-users mailing list

[2017 Date Index] [2017 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [jed-users] entab/detab


You know, I tried to play with this today. I even read through the documentation. What I cannot find and will certainly create a blog post about is just how one provides a "prefix" argument to the untab() function from the S-Lang command line. This appears to be a piece of the lore "just assumed."

I looked at the code here: https://searchcode.com/codesearch/view/19435302/

I also couldn't get untab_convert_to_tabs() to function. It went all the way to bottom of buffer, but didn't insert any tabs. Does this function not work if tabs are disabled in .jedrc?


On 08/24/2017 02:47 AM, Guenter Milde wrote:
On 24.08.17, Peter D. Gray wrote:
Hi people,
I don't suppose anybody out there has a jed functions(s)
to perform entab/detab, that is make a pass thru a buffer and replace spaces with tabs
everywhere while maintaining indentation, and the reverse, similar to the expand/unexpand
command. I want it to do all spaces to tabs and vice versa, not just
leading whitespace.
Have a look at the untab function:

  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.

The "bufutils" mode in jedmodes.sf.net (in Debian part of the jed-extra
package) has also a untab_buffer functions that just does

public define untab_buffer ()
{
    push_spot();
    mark_buffer();
    untab ();
    pop_spot();
}


Günter



_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.


--
Roland Hughes, President
Logikal Solutions
(630)-205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog
http://lesedi.us/
http://onedollarcontentstore.com


[2017 date index] [2017 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]