---
 doc/Makefile.am     |   14 ++++++++------
 doc/editline.3.roff |    6 +++---
 doc/editline.7.roff |   14 +++++++-------
 doc/editrc.5.roff   |   18 +++++++++---------
 4 files changed, 27 insertions(+), 25 deletions(-)

Index: libedit/doc/Makefile.am
===================================================================
--- libedit.orig/doc/Makefile.am
+++ libedit/doc/Makefile.am
@@ -1,5 +1,5 @@
 
-EL_MANS = editline.3 editline.7 editrc.5
+EL_MANS = editline.3edit editline.7edit editrc.5edit
 
 man_MANS = $(EL_MANS)
 
@@ -52,13 +52,15 @@ EL_MAN_LINKS += \
 install-data-hook: $(EL_MAN_LINKS)
 
 $(EL_MAN_LINKS):
-	(cd $(DESTDIR)$(man3dir) && rm -f $@ && $(LN_S) editline.3 $@)
+	(cd $(DESTDIR)$(man3dir) && rm -f $@ && $(LN_S) editline.3edit $@)
 
-$(EL_MANS):
+SUFFIXES = edit .roff
+
+%edit: %.roff
 	@if test "$(MANTYPE)" = "mdoc"; then\
-		cp $(srcdir)/$@.roff $@;\
-				else\
-		$(AWK) -f $(srcdir)/mdoc2man.awk $(srcdir)/$@.roff > $@ || rm -f $@;\
+		cp $(srcdir)/$< $@;\
+	else\
+		$(AWK) -f $(srcdir)/mdoc2man.awk $(srcdir)/$< > $@ || rm -f $@;\
 	fi;
 
 uninstall-local:
Index: libedit/doc/editline.3.roff
===================================================================
--- libedit.orig/doc/editline.3.roff
+++ libedit/doc/editline.3.roff
@@ -27,7 +27,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd November 9, 2018
-.Dt EDITLINE 3
+.Dt EDITLINE 3edit
 .Os
 .Sh NAME
 .Nm editline ,
@@ -950,9 +950,9 @@ is a NUL terminated string to tokenize.
 .Xr sh 1 ,
 .Xr signal 3 ,
 .Xr termcap 3 ,
-.Xr editrc 5 ,
+.Xr editrc 5edit ,
 .Xr termcap 5 ,
-.Xr editline 7
+.Xr editline 7edit
 .Sh HISTORY
 The
 .Nm
Index: libedit/doc/editline.7.roff
===================================================================
--- libedit.orig/doc/editline.7.roff
+++ libedit/doc/editline.7.roff
@@ -16,14 +16,14 @@
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
 .Dd May 7, 2016
-.Dt EDITLINE 7
+.Dt EDITLINE 7edit
 .Os
 .Sh NAME
 .Nm editline
 .Nd line editing user interface
 .Sh DESCRIPTION
 When a program using the
-.Xr editline 3
+.Xr editline 3edit
 library prompts for an input string using the function
 .Xr el_wgets 3 ,
 it reads characters from the terminal.
@@ -40,7 +40,7 @@ The program can switch the default to em
 or
 .Xr el_parse 3
 functions, and the user can switch to emacs mode either in the
-.Xr editrc 5
+.Xr editrc 5edit
 configuration file or interactively with the
 .Ic ed-command
 editor command, in all three cases executing the
@@ -53,7 +53,7 @@ return a string.
 .Ss Input character bindings
 All default bindings described below can be overridden by individual
 programs and can be changed with the
-.Xr editrc 5
+.Xr editrc 5edit
 .Ic bind
 builtin command.
 .Pp
@@ -329,7 +329,7 @@ Ignore any argument.
 .It Ic ed-command Pq vi command: So \&: Sc ; emacs: Meta-X, Meta-x
 Read a line from the terminal bypassing the normal line editing
 functionality and execute that line as an
-.Xr editrc 5
+.Xr editrc 5edit
 builtin command.
 If in vi command mode, also switch back to vi insert mode.
 Ignore any argument.
@@ -919,11 +919,11 @@ of appending to the input queue.
 .Sh SEE ALSO
 .Xr mg 1 ,
 .Xr vi 1 ,
-.Xr editline 3 ,
+.Xr editline 3edit ,
 .Xr el_wgets 3 ,
 .Xr el_wpush 3 ,
 .Xr el_wset 3 ,
-.Xr editrc 5
+.Xr editrc 5edit
 .Sh HISTORY
 This manual page first appeared in
 .Ox 6.0
Index: libedit/doc/editrc.5.roff
===================================================================
--- libedit.orig/doc/editrc.5.roff
+++ libedit/doc/editrc.5.roff
@@ -27,7 +27,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .Dd May 22, 2016
-.Dt EDITRC 5
+.Dt EDITRC 5edit
 .Os
 .Sh NAME
 .Nm editrc
@@ -38,7 +38,7 @@
 The
 .Nm
 file defines various settings to be used by the
-.Xr editline 3
+.Xr editline 3edit
 library.
 .Pp
 The format of each line is:
@@ -47,7 +47,7 @@ The format of each line is:
 .Pp
 .Ar command
 is one of the
-.Xr editline 3
+.Xr editline 3edit
 builtin commands.
 Refer to
 .Sx BUILTIN COMMANDS
@@ -57,7 +57,7 @@ for more information.
 is the program name string that a program defines when it calls
 .Xr el_init 3
 to set up
-.Xr editline 3 ,
+.Xr editline 3edit ,
 which is usually
 .Va argv[0] .
 .Ar command
@@ -138,7 +138,7 @@ bindings.
 .El
 .Pp
 The
-.Xr editline 7
+.Xr editline 7edit
 manual documents all editor commands and contains more information
 about macros and the input queue.
 .Pp
@@ -297,7 +297,7 @@ List the values of all the terminal capa
 .Bl -tag -width "~/.editrcXXX"
 .It Ev EDITRC
 Names the default configuration file for the
-.Xr editline 3
+.Xr editline 3edit
 library.
 .El
 .Sh FILES
@@ -305,14 +305,14 @@ library.
 .It Pa ~/.editrc
 Last resort, if no other file is specified,
 user configuration file for the
-.Xr editline 3
+.Xr editline 3edit
 library.
 .El
 .Sh SEE ALSO
-.Xr editline 3 ,
+.Xr editline 3edit ,
 .Xr regex 3 ,
 .Xr termcap 5 ,
-.Xr editline 7
+.Xr editline 7edit
 .Sh AUTHORS
 .An -nosplit
 The
