diff --git a/NEWS b/NEWS
index 0127565..eba53bc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Version 1.35 November 25, 2004
+
+ * Set program name to the first word of NAME paragraph in --include
+ file if given.
+
Version 1.34 November 20, 2004
* Escape all unescaped hyphens in output.
diff --git a/README b/README
index 3a5980a..0d6facb 100644
--- a/README
+++ b/README
@@ -1,10 +1,10 @@
- README for GNU help2man version 1.34
+ README for GNU help2man version 1.35
help2man is a script to create simple man pages from the --help and
--version output of programs.
http://www.gnu.org/software/help2man/
- ftp://ftp.gnu.org/gnu/help2man/help2man-1.34.2.tar.gz
+ ftp://ftp.gnu.org/gnu/help2man/help2man-1.35.1.tar.gz
Since most GNU documentation is now in info format, this provides a
way to generate a placeholder man page pointing to that resource while
diff --git a/debian/changelog b/debian/changelog
index 0c334d6..1ca4c73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+help2man (1.35.1) unstable; urgency=low
+
+ * Set program name to the first word of NAME paragraph in --include
+ file if given.
+
+ -- Brendan O'Dea <bod@debian.org> Thu, 25 Nov 2004 21:06:58 +1100
+
help2man (1.34.2) unstable; urgency=low
* Update Polish translation (thanks to Jakub Bogusz).
diff --git a/help2man.1 b/help2man.1
index be77e50..66d718e 100644
--- a/help2man.1
+++ b/help2man.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34.
-.TH HELP2MAN "1" "November 2004" "help2man 1.34" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
+.TH HELP2MAN "1" "November 2004" "help2man 1.35" "User Commands"
.SH NAME
help2man \- generate a simple manual page
.SH SYNOPSIS
diff --git a/help2man.PL b/help2man.PL
index d363682..2eeefc6 100755
--- a/help2man.PL
+++ b/help2man.PL
@@ -16,7 +16,7 @@ use Config;
use Getopt::Long;
my ($program, $version)
- = (qw$Id: help2man.PL,v 1.34 2004/11/19 23:07:46 bod Exp $)[1..2];
+ = (qw$Id: help2man.PL,v 1.35 2004/11/25 10:19:54 bod Exp $)[1..2];
$program =~ s/\.PL(,v)?$//;
@@ -350,12 +350,22 @@ $program =~ s!.*/!!;
# No info for `info' itself.
$opt_no_info = 1 if $program eq 'info';
-# --name overrides --include contents.
-$include{_('NAME')} = "$program \\- $opt_name\n" if $opt_name;
-
-# Default (useless) NAME paragraph.
-$include{_('NAME')} ||= sprintf _("%s \\- manual page for %s %s") . "\n",
- $program, $program, $version;
+for ($include{_('NAME')})
+{
+ if ($opt_name) # --name overrides --include contents.
+ {
+ $_ = "$program \\- $opt_name\n";
+ }
+ elsif ($_) # Use first name given as $program
+ {
+ $program = $1 if /^([^\s,]+)(?:,?\s*[^\s,\\-]+)*\s+\\?-/;
+ }
+ else # Set a default (useless) NAME paragraph.
+ {
+ $_ = sprintf _("%s \\- manual page for %s %s") . "\n", $program,
+ $program, $version;
+ }
+}
# Man pages traditionally have the page title in caps.
my $PROGRAM = uc $program;
diff --git a/help2man.fr.1 b/help2man.fr.1
index 09629ac..ba28aa2 100644
--- a/help2man.fr.1
+++ b/help2man.fr.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34.
-.TH HELP2MAN "1" "novembre 2004" "help2man 1.34" "Commandes"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
+.TH HELP2MAN "1" "novembre 2004" "help2man 1.35" "Commandes"
.SH NOM
help2man \- génčre une page de manuel sommaire
.SH SYNOPSIS
diff --git a/help2man.pl.1 b/help2man.pl.1
index a5a3c97..75cb275 100644
--- a/help2man.pl.1
+++ b/help2man.pl.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.34.
-.TH HELP2MAN "1" "listopad 2004" "help2man 1.34" "Polecenia użytkownika"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
+.TH HELP2MAN "1" "listopad 2004" "help2man 1.35" "Polecenia użytkownika"
.SH NAZWA
help2man \- generowanie prostej strony podręcznika
.SH SKŁADNIA