Although documented in the man page, mg is not compiled with -DNOTAB, so it
isn't actually available. This patch fixes that.
--- Makefile.orig Sun Sep 12 18:03:23 2010
+++ Makefile Sun Sep 12 18:03:54 2010
@@ -12,8 +12,9 @@ DPADD+= ${LIBCURSES}
# STARTUP -- look for and handle initialization file.
# XKEYS -- use termcap function key definitions.
# note: XKEYS and bsmap mode do _not_ get along.
+# NOTAB -- enable no-tab-mode
#
-CFLAGS+=-Wall -DFKEYS -DREGEX -DXKEYS
+CFLAGS+=-Wall -DFKEYS -DREGEX -DXKEYS -DNOTAB
SRCS= autoexec.c basic.c buffer.c cinfo.c dir.c dired.c display.c \
echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
--- cmode.c.orig Sun Sep 12 17:59:10 2010
+++ cmode.c Sun Sep 12 17:59:48 2010
@@ -242,7 +242,7 @@ getindent(const struct line *lp, int *curi)
break;
if (c == '\t'
#ifdef NOTAB
- && !(curbp-b_flag & BFNOTAB)
+ && !(curbp->b_flag & BFNOTAB)
#endif /* NOTAB */
) {
nicol |= 0x07;
--- random.c.orig Sun Sep 12 17:57:56 2010
+++ random.c Sun Sep 12 17:58:39 2010
@@ -367,7 +367,7 @@ indent(int f, int n)
(void)gotobol(FFRAND, 1);
if (
#ifdef NOTAB
- curbp->b_flag & BFNOTAB) ? linsert(n, ' ') == FALSE :
+ (curbp->b_flag & BFNOTAB) ? linsert(n, ' ') == FALSE :
#endif /* NOTAB */
(((i = n / 8) != 0 && linsert(i, '\t') == FALSE) ||
((i = n % 8) != 0 && linsert(i, ' ') == FALSE)))
--
http://noncombatant.org/