From d3e80d0c46dd514fdda6b27215af594101f4ccb7 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Thu, 4 Sep 2014 12:32:09 +0300 Subject: [PATCH 1/2] Ticket #3243: "User menu -> View manual page" doesn't do coloring Rename menu.mc and menu.mc.sr for substitute variables from configure.ac file Signed-off-by: Slava Zanko --- configure.ac | 3 +++ misc/Makefile.am | 17 +++++++++++++---- misc/{mc.menu => mc.menu.in} | 0 misc/{mc.menu.sr => mc.menu.sr.in} | 0 misc/{mcedit.menu => mcedit.menu.in} | 0 5 files changed, 16 insertions(+), 4 deletions(-) rename misc/{mc.menu => mc.menu.in} (100%) rename misc/{mc.menu.sr => mc.menu.sr.in} (100%) rename misc/{mcedit.menu => mcedit.menu.in} (100%) diff --git a/configure.ac b/configure.ac index 6591c53ca..c82fdd02f 100644 --- a/configure.ac +++ b/configure.ac @@ -510,6 +510,9 @@ contrib/dist/pkginfo contrib/dist/prototype misc/Makefile +misc/mc.menu +misc/mcedit.menu +misc/mc.menu.sr misc/skins/Makefile misc/ext.d/Makefile misc/ext.d/doc.sh diff --git a/misc/Makefile.am b/misc/Makefile.am index 870a164bd..4f6135832 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -12,14 +12,22 @@ if CHARSET pkgdata_DATA += mc.charsets endif +SCRIPTS_IN = \ + mc.menu.in \ + mc.menu.sr.in \ + mcedit.menu.in + +SCRIPTS_OUT = \ + mc.menu \ + mc.menu.sr \ + mcedit.menu + LIBFILES_CONST = \ - mcedit.menu \ filehighlight.ini \ mc.keymap \ mc.default.keymap \ - mc.emacs.keymap \ - mc.menu \ - mc.menu.sr + mc.emacs.keymap + LIBFILES_SCRIPT = \ edit.indent.rc @@ -29,6 +37,7 @@ CLEANFILES = $(SCRIPTS_OUT) cfgdir = $(sysconfdir)/@PACKAGE@ cfg_DATA = \ $(LIBFILES_CONST) \ + $(SCRIPTS_OUT) \ $(LIBFILES_OUT) cfg_SCRIPTS = \ diff --git a/misc/mc.menu b/misc/mc.menu.in similarity index 100% rename from misc/mc.menu rename to misc/mc.menu.in diff --git a/misc/mc.menu.sr b/misc/mc.menu.sr.in similarity index 100% rename from misc/mc.menu.sr rename to misc/mc.menu.sr.in diff --git a/misc/mcedit.menu b/misc/mcedit.menu.in similarity index 100% rename from misc/mcedit.menu rename to misc/mcedit.menu.in From b11dd8908795d624eb973221f119d4afd8a9fe45 Mon Sep 17 00:00:00 2001 From: Egmont Koblinger Date: Thu, 4 Sep 2014 13:14:51 +0300 Subject: [PATCH 2/2] Fix for viewving man pages in colour mode. Signed-off-by: Slava Zanko --- misc/mc.menu.in | 4 ++-- misc/mc.menu.sr.in | 2 +- misc/mcedit.menu.in | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/misc/mc.menu.in b/misc/mc.menu.in index 577f9273e..4d341a73a 100644 --- a/misc/mc.menu.in +++ b/misc/mc.menu.in @@ -21,7 +21,7 @@ shell_patterns=0 =+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r 1 Display the file with roff -man - nroff -man %f | less + %view{ascii,nroff} roff @MAN_FLAGS@ @MANDOC@ %f 2 Call the info hypertext browser info @@ -121,7 +121,7 @@ D Delete tagged files if a copy exists in the other directory. m View manual page MAN=%{Enter manual name} - %view man -P cat $MAN + %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 man -P cat $MAN = f \.gz$ & t r + ! t t diff --git a/misc/mc.menu.sr.in b/misc/mc.menu.sr.in index 6a505f429..a0bb57a7e 100644 --- a/misc/mc.menu.sr.in +++ b/misc/mc.menu.sr.in @@ -102,7 +102,7 @@ D Обриши означене датотеке ако постоји к m Погледај страницу упутства MAN=%{Унесите назив упутства} - %view man -P cat $MAN + %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 man -P cat $MAN = f \.gz$ & t r + ! t t diff --git a/misc/mcedit.menu.in b/misc/mcedit.menu.in index 3d11d96f8..df44b960a 100644 --- a/misc/mcedit.menu.in +++ b/misc/mcedit.menu.in @@ -459,10 +459,7 @@ s Invoke `shell' m view `man' MAN=%{Enter name of man:} - TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/mcview.$MAN.XXXXXX` || exit 1 - man -Pcat $MAN >$TMPFILE - mcview $TMPFILE - rm -f $TMPFILE + %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 man -P cat $MAN i Insert a out of command to cursor. CMD=%{ Enter command: }