[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #51106] [Patch] Protect significant space at the end of lines
From: |
Bjarni Ingi Gislason |
Subject: |
[bug #51106] [Patch] Protect significant space at the end of lines |
Date: |
Wed, 24 May 2017 09:11:14 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?51106>
Summary: [Patch] Protect significant space at the end of
lines
Project: GNU troff
Submitted by: bjarniig
Submitted on: Wed 24 May 2017 01:11:13 PM UTC
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
>From 32c579c98bd2c12a4d85d79de7ded5f2c1c2b538 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <address@hidden>
Date: Wed, 24 May 2017 12:58:09 +0000
Subject: [PATCH] Protect significant space at the end of lines
Insignificant space in the same location and file is removed.
"git" issues a warning when there is a space character at the end of
an updated line.
Signed-off-by: Bjarni Ingi Gislason <address@hidden>
---
contrib/mom/om.tmac-u | 60
+++++++++++++++++++++++++--------------------------
tmac/TESTING-HINTS | 10 ++++-----
tmac/e.tmac-u | 2 +-
tmac/hyphen.fr | 2 +-
tmac/hyphen.sv | 2 +-
tmac/s.tmac | 4 ++--
tmac/tmac.am | 2 +-
tmac/www.tmac.in | 8 +++----
8 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/contrib/mom/om.tmac-u b/contrib/mom/om.tmac-u
index f9e8d03f..c20510e9 100644
--- a/contrib/mom/om.tmac-u
+++ b/contrib/mom/om.tmac-u
@@ -3246,7 +3246,7 @@ end
.END
\#
\# Aliases for RULE_WEIGHT
-\#
+\#
.ALIAS BIB_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
.ALIAS DOCTYPE_UNDERLINE_WEIGHT RULE_WEIGHT
.ALIAS EN_STRING_UNDERLINE_WEIGHT RULE_WEIGHT
@@ -3260,7 +3260,7 @@ end
.ALIAS UNDERSCORE_WEIGHT RULE_WEIGHT
\#
\# Default rule weights
-\#
+\#
.nr #BIB_STRING_UNDERLINE_WEIGHT 500
.nr #DOCTYPE_UNDERLINE_WEIGHT 500
.nr #EN_STRING_UNDERLINE_WEIGHT 500
@@ -3886,13 +3886,13 @@ end
. if '\\$0'LC_TO_CAPS' \{\
. nr #LOOP 0 1
. while \\n+[#LOOP]<=58 \{\
-. tr \\*[$c\\n[#LOOP]]\\*[$C\\n[#LOOP]]
+. tr \\*[$c\\n[#LOOP]]\\*[$C\\n[#LOOP]]
. \}
. \}
. if '\\$0'CAPS_TO_LC' \{\
. nr #LOOP 0 1
. while \\n+[#LOOP]<=58 \{\
-. tr \\*[$c\\n[#LOOP]]\\*[$c\\n[#LOOP]]
+. tr \\*[$c\\n[#LOOP]]\\*[$c\\n[#LOOP]]
. \}
. \}
.END
@@ -5333,7 +5333,7 @@ y\R'#DESCENDER \\n[.cdp]'
. ds $STYLE_TYPE PAGENUM
. nr #LOOP 0 1
. nr #STYLE_PARAMS \\n[#NUM_ARGS]
-. while \\n+[#LOOP]<=\\n[#STYLE_PARAMS] \{\
+. while \\n+[#LOOP]<=\\n[#STYLE_PARAMS] \{\
. if '\\$1'FAMILY' \{\
. shift
. \\*[$STYLE_TYPE]_FAMILY \\$1
@@ -5614,7 +5614,7 @@ SMALLCAPS takes precedence.
.MAC DEFAULTS END
. if !d $PAPER .PAPER LETTER
. if !\\n[#DOC_TYPE] .DOCTYPE DEFAULT
-. if !r #CH_NUM .nr #CH_NUM 1
+. if !r #CH_NUM .nr #CH_NUM 1
. ie \\n[#PAGENUM_STYLE_SET] .PAGENUM_STYLE \\*[$PAGENUM_STYLE]
. el \
. if !\\n[#COPY_STYLE]=1 .PAGENUM_STYLE DIGIT
@@ -6916,7 +6916,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM]
\\$\\n[#\\*[DOC_]COVERTITLE_
\# <width> and <height> are required. With no further args, images
\# are set at 0,0 by default so that full page images fill the entire
\# printer sheet.
-\#
+\#
\# Positioning args are the same as PDF_IMAGE. -L, -R, -C and -I <ind>
\# observe the left and right margins.
\#
@@ -7356,7 +7356,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM]
\\$\\n[#\\*[DOC_]COVERTITLE_
. ie \\n[#\\*[DOC_]COVER_ATTRIBUTE_UNDERLINE]=2 \
. UNDERSCORE2 \\*[$\\*[DOC_]COVER_ATTRIBUTE_UNDERLINE_GAP] \
\\*[$\\*[DOC_]COVER_ATTRIBUTE_RULE_GAP]
"\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]"
-. el .UNDERSCORE \\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]
+. el .UNDERSCORE \\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]
. \}
. el .PRINT "\\*[$\\*[DOC_]COVER_ATTRIBUTE_STRING]"
. SMALLCAPS off
@@ -7399,7 +7399,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM]
\\$\\n[#\\*[DOC_]COVERTITLE_
. ie \\n[#\\*[DOC_]COVER_DOCTYPE_UNDERLINE]=2 \
. UNDERSCORE2 \\*[$\\*[DOC_]COVER_DOCTYPE_UNDERLINE_GAP] \
\\*[$\\*[DOC_]COVER_DOCTYPE_RULE_GAP] "\\*[$DOC_TYPE]"
-. el .UNDERSCORE "\\*[$DOC_TYPE]"
+. el .UNDERSCORE "\\*[$DOC_TYPE]"
. \}
. el .PRINT "\\*[$DOC_TYPE]"
. SMALLCAPS off
@@ -8126,9 +8126,9 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM]
\\$\\n[#\\*[DOC_]COVERTITLE_
. if !'\\$0'SHIM_1' .return
. if !\\n[#NO_FLEX] \{\
. if !'\\$0'SHIM_1' \{\
-. tm1 "[mom]:
+. tm1 "[mom]: \" protect 1 space character
SHIM, line \\n[.c], is incompatible with flex-spacing, which is enabled.
-. tm1 "
+. tm1 " \" protect 7 space characters
Flex-spacing must be disabled with NO_FLEX before using SHIM.
. ab [mom]: Aborting '\\n[.F]', line \\n[.c].
. \}
@@ -10486,7 +10486,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. if !\\n[#HEAD_\\n[#LEVEL]_NO_SHIM] .SHIM
. el \{\
. if !\\n[#NO_FLEX] \
-. if !\\n[#HEAD_\\n[#LEVEL]_NO_FLEX] .FLEX
+. if !\\n[#HEAD_\\n[#LEVEL]_NO_FLEX] .FLEX
. \}
. \}
. \}
@@ -10696,7 +10696,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. nr #CAPS_RESTORE 1
. \}
. if \\n[#HEAD_\\n[#LEVEL]_CAPS] \{\
-. CAPS
+. CAPS
. nr #CAPS_OFF 1
. \}
. if \\n[#SMALLCAPS_ON] \{\
@@ -10704,7 +10704,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. nr #SMALLCAPS_RESTORE 1
. \}
. if \\n[#HEAD_\\n[#LEVEL]_SMALLCAPS] \{\
-. SMALLCAPS
+. SMALLCAPS
. nr #SMALLCAPS_OFF 1
. \}
. if !'\\*[$HEAD_\\n[#LEVEL]_COLOR]'' \
@@ -10718,7 +10718,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. if
(\\n[#HEAD_\\n[#LEVEL]_UNDERSCORE]=0)&(\\n[#HEAD_\\n[#LEVEL]_UNDERSCORE2]=0)
\{\
. ie \\n[#HD_NUM_INDENT] \{\
. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
-. ti \\n[#HD_NUM_INDENT]u
+. ti \\n[#HD_NUM_INDENT]u
. PRINT \
"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
. br
@@ -10756,7 +10756,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. UNDERSCORE_WEIGHT \\*[$HEAD_\\n[#LEVEL]_UL_WEIGHT]
. ie \\n[#HD_NUM_INDENT] \{\
. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
-. ti \\n[#HD_NUM_INDENT]u
+. ti \\n[#HD_NUM_INDENT]u
. UNDERSCORE \\*[$HEAD_\\n[#LEVEL]_UL_GAP] \
"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
. br
@@ -10791,7 +10791,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. UNDERSCORE_WEIGHT \\*[$HEAD_\\n[#LEVEL]_UL2_WEIGHT]
. ie \\n[#HD_NUM_INDENT] \{\
. if !'\\*[$HEAD_\\n[#LEVEL]_QUAD]'CENTER' \
-. ti \\n[#HD_NUM_INDENT]u
+. ti \\n[#HD_NUM_INDENT]u
. UNDERSCORE2 \\*[$HEAD_\\n[#LEVEL]_UL2_GAP_1] \
\\*[$HEAD_\\n[#LEVEL]_UL2_GAP_2] \
"\v'-\\*[$HEAD_\\n[#LEVEL]_BASELINE_ADJ]'\\$[\\n[#ARG_NUM]]
@@ -10876,7 +10876,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
\# QUAD <direction>
\# NUMBER | NO_NUMBER
\# SPACE_AFTER | NO_SPACE_AFTER
-\# UNDERSCORE <weight> <gap> | UNDERSCORE2 <weight> <gap1> <gap2>
+\# UNDERSCORE <weight> <gap> | UNDERSCORE2 <weight> <gap1> <gap2>
\# NO_UNDERSCORE | NO_UNDERSCORE2
\# BASELINE_ADJUST
\#---when called as TOC_ENTRY_STYLE this is also available---
@@ -12331,7 +12331,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
.\" grid (ie. on the first valid baseline of the page).
. ie \\n[#Q_TOP]=\\n[#PAGE_TOP] \{\
. if \\n[#QUOTE]=1 .ds $QUOTE_TYPE Q
-. if \\n[#QUOTE]=2 .ds $QUOTE_TYPE B
+. if \\n[#QUOTE]=2 .ds $QUOTE_TYPE B
. rn \\*[$QUOTE_TYPE]_QUOTE Q_TEMP
. di \\*[$QUOTE_TYPE]_QUOTE
. nf
@@ -12360,7 +12360,7 @@ Shimming must be disabled with NO_SHIM before using
FLEX.
. ds quote-type quote
. \}
. if \\n[#QUOTE]=2 \{\
-. ds $QUOTE_TYPE B
+. ds $QUOTE_TYPE B
. ds quote-type blockquote
. \}
. if \\n[has-caption] \{\
@@ -15503,7 +15503,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
. \}
. el .DOC_LEAD \\*[$TOC_LEAD]
. ie \\n[#TOC_HEADER_V_POS] \
-. DOCHEADER OFF \\n[#TOC_HEADER_V_POS]u-\\n[#DOC_LEAD]u
+. DOCHEADER OFF \\n[#TOC_HEADER_V_POS]u-\\n[#DOC_LEAD]u
. el .DOCHEADER OFF \\n[#T_MARGIN]u-\\n[#DOC_LEAD]u
. if (\\n[#PRINT_STYLE]=1)&(\\n[#SINGLE_SPACE]=1) \
. DOCHEADER OFF \\n[#T_MARGIN]u-(\\n[#DOC_LEAD]u*2u)
@@ -15882,7 +15882,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\# receive the text of an item.
\#
.MAC ITEM END
-. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'plain' .nop
+. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'plain' .nop
. if !r#DEPTH .return
. if \\n[#LINENUMBERS]=1 \{\
. NUMBER_LINES OFF
@@ -16853,7 +16853,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
. ie !\\n[#NO_SHIM] .SHIM
. el \{\
. if !\\n[#NO_FLEX] \
-. if !\\n[flexed] .FLEX
+. if !\\n[flexed] .FLEX
. \}
. if !\\n[#NO_SHIM] \
. if \\n[#SHIM]>(\\n[#DOC_LEAD]-(\\n[#DOC_LEAD]/4)) \
@@ -18226,7 +18226,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
. if '\\*[pdf-img:pos]'-I' \{\
. ll
\\n[pdf-img:ind]u+\\n[pdf-img:width]u+(\\n[pdf-img:frame-inset]u*2u)
. in \\n[pdf-img:ind]u
-. \}
+. \}
. \}
. \}
. \}
@@ -18316,7 +18316,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\# *Notes:
\# SIZE is relative to running text.
\# QUAD optional arg says quad on full line length rather than
-\# pdf-img or pre-processor output.
+\# pdf-img or pre-processor output.
\#
.MAC CAPTION_LABEL_SPECS END
. if '\\$0'CAPTIONS' .ds spec-type caption
@@ -18403,7 +18403,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
. ds \\*[label-type]*\\*[spec-type]-quad \\$1
. substring \\*[label-type]*\\*[spec-type]-quad 0 0
. if \\n[\\*[label-type]*\\*[spec-type]-quad-on-ll] \
-. rr \\*[label-type]*\\*[spec-type]-quad-on-ll
+. rr \\*[label-type]*\\*[spec-type]-quad-on-ll
. if '\\$2'ON_LL' \
. nr \\*[label-type]*\\*[spec-type]-quad-on-ll 1
. \}
@@ -18882,7 +18882,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\# *Notes:
\# Used to set autolabel number when manual labelling of floats
\# (in conjunction with TO_LIST) disrupts auto-incrementing.
-\#
+\#
.MAC SET_AUTOLABEL END
. rm labelnum-type
. if '\\$1'FIG' .ds labelnum-type fig
@@ -19634,7 +19634,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\#
.MAC TE END
. ev tbl*end \" Needed because of .ad changes
-. evc \\*[ev-current]
+. evc \\*[ev-current]
. nh
. nf
. rr tbl*no-header
@@ -22659,7 +22659,7 @@ No room to start \\*[MN-pos] margin note #\\n[MN-curr]
on page \\n[#P].
. if !\\n[#NO_FLEX] \
. if !\\n[pdf-img*no-flex] .FLEX
. \}
-. PDF_IMAGE_CLEAN
+. PDF_IMAGE_CLEAN
.END
\#
\# PDF_IMAGE_FRAME
@@ -22693,7 +22693,7 @@ No room to start \\*[MN-pos] margin note #\\n[MN-curr]
on page \\n[#P].
. \}
. el \{\
. ds frame-arg \\$1
-. substring frame-arg -1
+. substring frame-arg -1
. length arg-len \\*[frame-arg]
. if \\n[arg-len]=1 \{\
. tm1 "[mom]: \\$0 rule weight argument at line \\n[.c]
diff --git a/tmac/TESTING-HINTS b/tmac/TESTING-HINTS
index 818d539a..ccbe9205 100644
--- a/tmac/TESTING-HINTS
+++ b/tmac/TESTING-HINTS
@@ -1,18 +1,18 @@
-Here are some hints about testing modifications to macro packages
+Here are some hints about testing modifications to macro packages
and manual pages.
1. Use groff's `-ww' option to catch potential problems.
Ideally, there shouldn't be any warnings.
2. For a well-formedness check, run doclifter
(http://catb.org/~esr/doclifter)
- against your page. This tool was written to lift pages to XML, but as a
- side effect it acts as a validator that will warn you of potential
problems
+ against your page. This tool was written to lift pages to XML, but as a
+ side effect it acts as a validator that will warn you of potential
problems
and non-portable constructs.
-3. The two most important groff client types are X terminal emulators
+3. The two most important groff client types are X terminal emulators
and Postscript printers. Eyeball-check your output under both.
-4. The colorized man output of the Midnight Commander (what you get by
+4. The colorized man output of the Midnight Commander (what you get by
pressing the F3 key on a man page) is good for making small errors
more visible.
diff --git a/tmac/e.tmac-u b/tmac/e.tmac-u
index b1004f1f..efb5c7bc 100644
--- a/tmac/e.tmac-u
+++ b/tmac/e.tmac-u
@@ -1343,7 +1343,7 @@
.&&
. mk _q \" emit a single numbered line for PS picture
. rs
-\&\
+\&\ \" protect 1 space character
. br
. rt \\n(_qu
. PS_nm_check suspend init
diff --git a/tmac/hyphen.fr b/tmac/hyphen.fr
index 97c75f81..60e21d5d 100644
--- a/tmac/hyphen.fr
+++ b/tmac/hyphen.fr
@@ -488,7 +488,7 @@ g1s2
i1arthr
i1รจ2dre
% ill patterns missing from nb list
- il2l
+ il2l
cil3l
rcil4l
ucil4l
diff --git a/tmac/hyphen.sv b/tmac/hyphen.sv
index 407e156a..28d4c50a 100644
--- a/tmac/hyphen.sv
+++ b/tmac/hyphen.sv
@@ -1,5 +1,5 @@
% --------------------------------------------------------------------------
-% Swedish hyphenation patterns.
+% Swedish hyphenation patterns.
%
% Copyright 1994 by Jan Michael Rynning. All rights reserved.
% This program may be distributed and/or modified under the conditions of
diff --git a/tmac/s.tmac b/tmac/s.tmac
index c78c8efb..42bc7235 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -402,7 +402,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
. el .sp \\n[cov*sp]u
. cov*au-div!\\n[cov*i]
. ie d cov*ai-div!\\n[cov*i] \{\
-. sp .5v
+. sp .5v
. cov*ai-div!\\n[cov*i]
. nr cov*sp 1v
. \}
@@ -1965,7 +1965,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
.\" P1 is now defined in module pg.
.de SC
.nr bell_localisms 1
-.NH
+.NH
\\$*
..
.de UC
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 6032f417..1703c112 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -144,7 +144,7 @@ tmac-dist-hook:
cp -f $(top_srcdir)/$$f-u $(distdir)/tmac; \
done
-$(TMACMDOCFILES) $(TMACSTRIPFILES):
+$(TMACMDOCFILES) $(TMACSTRIPFILES):
$(MKDIR_P) $(top_builddir)/tmac
for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u >
$(top_builddir)/$$f; \
diff --git a/tmac/www.tmac.in b/tmac/www.tmac.in
index ccc2399e..db8d8e70 100644
--- a/tmac/www.tmac.in
+++ b/tmac/www.tmac.in
@@ -183,7 +183,7 @@ HTML always denotes XHTML also.
. substring \\$0:r 1 -1
. \}
. if !'\\*[\\$0:s]'' \
-. substring \\$0:s 1 -1
+. substring \\$0:s 1 -1
. ds \\$1 \\*[\\$0:s]\"
. rm \\$0:c
. rr \\$0:n
@@ -364,7 +364,7 @@ HTML always denotes XHTML also.
..
.
.\" www:url_check_tag str
-.\" If url named by \*[str] is internal (starts with #),
+.\" If url named by \*[str] is internal (starts with #),
.\" redefine \*[str] to be the value of the string TAG_url.
.
.de www:url_check_tag
@@ -379,7 +379,7 @@ HTML always denotes XHTML also.
. ds \\$1 \\*[\\*[\\$0:tmp]]\"
. el \
. ds \\$1 see below\"
-. \}
+. \}
. rm \\$0:tmp
..
.
@@ -700,7 +700,7 @@ HTML always denotes XHTML also.
.\" N2 - number register name for absolute value
.\" S1 - string register name for percentage value
.\"
-.de www-handle-percent
+.de www-handle-percent
. ds www-percent \\$1\"
. substring www-percent -1 -1
.
--
2.11.0
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51106>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #51106] [Patch] Protect significant space at the end of lines,
Bjarni Ingi Gislason <=