Hi!

Going to end and begging of buffer doesn't set marks in Emacs.

Index: basic.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/basic.c,v
retrieving revision 1.47
diff -u -p -u -p -r1.47 basic.c
--- basic.c     10 Oct 2015 09:13:14 -0000      1.47
+++ basic.c     6 Feb 2019 21:18:34 -0000
@@ -122,7 +122,6 @@ forwchar(int f, int n)
 int
 gotobob(int f, int n)
 {
-       (void) setmark(f, n);
        curwp->w_dotp = bfirstlp(curbp);
        curwp->w_doto = 0;
        curwp->w_rflag |= WFFULL;
@@ -140,7 +139,6 @@ gotoeob(int f, int n)
 {
        struct line     *lp;
 
-       (void) setmark(f, n);
        curwp->w_dotp = blastlp(curbp);
        curwp->w_doto = llength(curwp->w_dotp);
        curwp->w_dotline = curwp->w_bufp->b_lines;
Index: region.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/region.c,v
retrieving revision 1.37
diff -u -p -u -p -r1.37 region.c
--- region.c    9 Sep 2016 06:05:51 -0000       1.37
+++ region.c    6 Feb 2019 21:18:34 -0000
@@ -405,6 +405,7 @@ markbuffer(int f, int n)
 {
        if (gotoeob(f,n) == FALSE)
                return (FALSE);
+       (void) setmark(f, n);
        if (gotobob(f,n) == FALSE)
                return (FALSE);
        return (TRUE);

Reply via email to