aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acme/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/acme/exec.c')
-rw-r--r--src/cmd/acme/exec.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index 2a259533..b46d7792 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -53,6 +53,7 @@ void putall(Text*, Text*, Text*, int, int, Rune*, int);
void sendx(Text*, Text*, Text*, int, int, Rune*, int);
void sort(Text*, Text*, Text*, int, int, Rune*, int);
void tab(Text*, Text*, Text*, int, int, Rune*, int);
+void tabexpand(Text*, Text*, Text*, int, int, Rune*, int);
void zeroxx(Text*, Text*, Text*, int, int, Rune*, int);
typedef struct Exectab Exectab;
@@ -92,6 +93,7 @@ static Rune LSend[] = { 'S', 'e', 'n', 'd', 0 };
static Rune LSnarf[] = { 'S', 'n', 'a', 'r', 'f', 0 };
static Rune LSort[] = { 'S', 'o', 'r', 't', 0 };
static Rune LTab[] = { 'T', 'a', 'b', 0 };
+static Rune LTabexpand[] = { 'T', 'a', 'b', 'e', 'x', 'p', 'a', 'n', 'd', 0 };
static Rune LUndo[] = { 'U', 'n', 'd', 'o', 0 };
static Rune LZerox[] = { 'Z', 'e', 'r', 'o', 'x', 0 };
@@ -123,6 +125,7 @@ Exectab exectab[] = {
{ LSnarf, cut, FALSE, TRUE, FALSE },
{ LSort, sort, FALSE, XXX, XXX },
{ LTab, tab, FALSE, XXX, XXX },
+ { LTabexpand, tabexpand, FALSE, XXX, XXX },
{ LUndo, undo, FALSE, TRUE, XXX },
{ LZerox, zeroxx, FALSE, XXX, XXX },
{ nil, 0, 0, 0, 0 }
@@ -1359,6 +1362,28 @@ tab(Text *et, Text *_0, Text *argt, int _1, int _2, Rune *arg, int narg)
}
void
+tabexpand(Text *et, Text *_0, Text *argt, int _1, int _2, Rune *arg, int narg)
+{
+ Window *w;
+
+ USED(_0);
+ USED(_1);
+ USED(_2);
+
+ if(et==nil || et->w==nil)
+ return;
+ w = et->w;
+
+ if(w->tabexpand){
+ w->tabexpand = FALSE;
+ warning(nil, "%.*S: Tabexpand OFF\n", w->body.file->nname, w->body.file->name);
+ }else{
+ w->tabexpand = TRUE;
+ warning(nil, "%.*S: Tabexpand ON\n", w->body.file->nname, w->body.file->name);
+ }
+}
+
+void
runproc(void *argvp)
{
/* args: */