The current direction of marking paragraphs using 'mark-paragraph' in mg
is the opposite of emacs. Emacs goes backwards, mg goes forwards. This
diff brings mg inline with emacs, and also simplifies the code, and fixes
another bug with the current code.
ok?
Index: paragraph.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/paragraph.c,v
retrieving revision 1.46
diff -u -p -u -p -r1.46 paragraph.c
--- paragraph.c 17 Nov 2018 09:52:34 -0000 1.46
+++ paragraph.c 23 Feb 2021 20:32:43 -0000
@@ -302,23 +302,16 @@ killpara(int f, int n)
int
markpara(int f, int n)
{
- int i = 0;
-
if (n == 0)
return (TRUE);
clearmark(FFARG, 0);
- if (findpara() == FALSE)
- return (TRUE);
-
- (void)do_gotoeop(FFRAND, n, &i);
-
/* set the mark here */
curwp->w_markp = curwp->w_dotp;
curwp->w_marko = curwp->w_doto;
- (void)gotobop(FFRAND, i);
+ (void)gotobop(FFRAND, n);
return (TRUE);
}