home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
me34exe.zip
/
mutt
/
misc
/
tabs.mut
< prev
Wrap
Text File
|
1995-01-14
|
486b
|
30 lines
;; [un]expand tabs
;; C Durland 10/93 Public Domain
(defun
tabs-to-spaces { (convert-um 8 "^I+") }
spaces-to-tabs { (convert-um 0 "[ ^I][ ^I]+") }
convert-um (int tab-size)(string um) HIDDEN
{
(int n)
(n (tab-stops))
(tab-stops tab-size)
(save-point
{{
(int col)
(beginning-of-buffer)
(while (re-search-forward (arg 0))
{
(col (current-column))
(delete-previous-whitespace)
(to-col col)
})
}} um)
(tab-stops n)
}
)