Index: src/gnu/usr.bin/man/Makefile.inc =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/man/Makefile.inc,v retrieving revision 1.17.2.2 diff -u -r1.17.2.2 Makefile.inc --- src/gnu/usr.bin/man/Makefile.inc 23 Feb 2001 09:39:21 -0000 1.17.2.2 +++ src/gnu/usr.bin/man/Makefile.inc 20 Oct 2001 12:54:46 -0000 @@ -5,7 +5,7 @@ # libdir= /etc bindir= ${BINDIR} -pager= more -s +pager= less -is manpath_config_file= /etc/manpath.config troff= /usr/bin/groff -S -man # -Tascii or localized encoding added automatically Index: src/gnu/usr.bin/man/man/man.c =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/man/man/man.c,v retrieving revision 1.37.2.9 diff -u -r1.37.2.9 man.c --- src/gnu/usr.bin/man/man/man.c 3 Sep 2002 17:41:54 -0000 1.37.2.9 +++ src/gnu/usr.bin/man/man/man.c 4 Sep 2002 11:46:57 -0000 @@ -339,8 +339,8 @@ break; case 'P': pager = strdup (optarg); - if (setenv("PAGER", pager, 1) != 0) - (void)fprintf(stderr, "setenv PAGER=%s\n", pager); + if (setenv("MANPAGER", pager, 1) != 0) + (void)fprintf(stderr, "setenv MANPAGER=%s\n", pager); break; case 'S': colon_sep_section_list = strdup (optarg); @@ -469,8 +469,9 @@ #endif /* __FreeBSD__ */ if (pager == NULL || *pager == '\0') - if ((pager = getenv ("PAGER")) == NULL || *pager == '\0') - pager = strdup (PAGER); + if ((pager = getenv ("MANPAGER")) == NULL || *pager == '\0') + if ((pager = getenv ("PAGER")) == NULL || *pager == '\0') + pager = strdup (PAGER); if (debug) fprintf (stderr, "\nusing %s as pager\n", pager); Index: src/gnu/usr.bin/man/man/man.man =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/man/man/man.man,v retrieving revision 1.10.2.7 diff -u -r1.10.2.7 man.man --- src/gnu/usr.bin/man/man/man.man 1 Feb 2002 09:00:02 -0000 1.10.2.7 +++ src/gnu/usr.bin/man/man/man.man 3 Feb 2002 09:05:44 -0000 @@ -34,7 +34,8 @@ .Nm Man formats and displays the on-line manual pages. This version knows about the -.Ev MANPATH +.Ev MANPATH , +.Ev MANPAGER and .Ev PAGER environment variables, so you can have @@ -69,6 +70,8 @@ uses .Nm %pager% . This option overrides the +.Ev MANPAGER +and .Ev PAGER environment variable. .It Fl S Ar list @@ -214,8 +217,11 @@ If .Ev MANSECT is set, its value is used to determine which manual sections to search. +.It Ev MANPAGER .It Ev PAGER If +.Ev MANPAGER +or .Ev PAGER is set, its value is used as the name of the program to use to display the man page. By default,