summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-06 11:00:54 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2019-02-06 11:00:54 +0000
commit9cd8661124409c76f10817e30328481ed3e02fea (patch)
treecec8974f9d2e24bd4e70301d1291e0aa204361d2 /Build/source/texk/web2c
parentdecf7a7941406ca1f91ecd8456cefb033d45a5aa (diff)
inhibitglue (ptex and friends 4 of 5)
git-svn-id: svn://tug.org/texlive/trunk@49958 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog14
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch167
-rw-r--r--Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex220
3 files changed, 342 insertions, 59 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index 09e340f4153..cee66f8f9ed 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -5,6 +5,20 @@
* tests/control_symbol.tex: More test cases.
* ptex_version.h: pTeX version p3.8.2.
+2019-02-03 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+ and Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * ptex-base.ch: Change the behavior of \inhibitglue. See
+ https://github.com/texjporg/tex-jp-build/issues/28.
+ - \inhibitglue becomes ineffective when it encounters a node.
+ (former commit on 2014-05-06 was still insufficient.)
+ - non-expandable tokens without node (e.g. \relax, assignment)
+ becomes transparent.
+ - \inhibitglue inside a list does not affect another list.
+ - Add new primitive \disinhibitglue to reset the inhibit glue
+ flag explicitly.
+ * tests/inhibitglue.tex: Added.
+
2019-01-23 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* ptex-base.ch: Add dump_kanji and undump_kanji.
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 9240bb9a1a6..bd850b61a73 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -1000,6 +1000,7 @@ kern_node,math_node,penalty_node: begin r:=get_node(small_node_size);
@!pdisp_field: scaled;
@!head_field,@!tail_field,@!pnode_field,@!last_jchr_field: pointer;
@!disp_called_field: boolean;
+ @!inhibit_glue_flag_field: integer;
@z
@x [16.213] l.4445 - pTeX: last_jchr, direction, adjust_dir, prev_{node,disp}
@@ -1014,6 +1015,7 @@ kern_node,math_node,penalty_node: begin r:=get_node(small_node_size);
@d prev_disp==cur_list.pdisp_field {displacemant at |prev_node|}
@d last_jchr==cur_list.last_jchr_field {final jchar node on current list}
@d disp_called==cur_list.disp_called_field {is a |disp_node| present in the current list?}
+@d inhibit_glue_flag==cur_list.inhibit_glue_flag_field {is \.{inhibitglue} is specified at the current list?}
@z
@x [16.214] l.4464 - pTeX: prev_append: disp_node
@@ -4044,6 +4046,17 @@ disp_node: begin link(p):=q; p:=q; q:=link(q); link(p):=null; goto done;
othercases confusion("mlist3")
@z
+@x [37.???] init_span: pTeX: init inhibit_glue_flag
+if mode=-hmode then space_factor:=1000
+else begin prev_depth:=ignore_depth; normal_paragraph;
+ end;
+@y
+if mode=-hmode then space_factor:=1000
+else begin prev_depth:=ignore_depth; normal_paragraph;
+ end;
+inhibit_glue_flag:=false;
+@z
+
@x [37.796] l.16276 - pTeX: call adjust_hlist
begin adjust_tail:=cur_tail; u:=hpack(link(head),natural); w:=width(u);
@y
@@ -4054,7 +4067,7 @@ othercases confusion("mlist3")
u:=hpack(link(head),natural); w:=width(u);
@z
-@x [37.799] l.16331 - pTeX: call adjust_hlist
+@x [37.799] l.16331 - fin_row: pTeX: call adjust_hlist
begin p:=hpack(link(head),natural);
@y
begin adjust_hlist(head,false);
@@ -4064,6 +4077,13 @@ othercases confusion("mlist3")
p:=hpack(link(head),natural);
@z
+@x [37.799] l.16331 - fin_row: init inhibit_glue_flag
+ link(tail):=p; tail:=p; space_factor:=1000;
+@y
+ link(tail):=p; tail:=p; space_factor:=1000;
+ inhibit_glue_flag:=false;
+@z
+
@x [37.800] l.16353 - pTeX: call adjust_hlist
var @!p,@!q,@!r,@!s,@!u,@!v: pointer; {registers for the list operations}
@y
@@ -4847,6 +4867,13 @@ else begin link(tail):=q; tail:=q;
end
@z
+@x [47.????] pTeX: reset inhibit_glue_flag at rule_node
+vmode+hrule,hmode+vrule,mmode+vrule: begin tail_append(scan_rule_spec);
+@y
+vmode+hrule,hmode+vrule,mmode+vrule: begin tail_append(scan_rule_spec);
+ inhibit_glue_flag := false;
+@z
+
@x [47.1060] pTeX: append_glue, inhibit_glue_flag
end; {now |cur_val| points to the glue specification}
tail_append(new_glue(cur_val));
@@ -4971,9 +4998,12 @@ q:pointer;
@z
@x [47.1076] pTeX: sub_exp_box
+ else begin if abs(mode)=hmode then space_factor:=1000
else begin p:=new_noad;
math_type(nucleus(p)):=sub_box;
@y
+ else begin if abs(mode)=hmode then
+ begin space_factor:=1000; inhibit_glue_flag:=false; end
else begin p:=new_noad;
math_type(nucleus(p)):=sub_exp_box;
@z
@@ -5004,7 +5034,7 @@ q:pointer;
end
@z
-@x [47.1079] l.20920 - pTeX: disp_node, adjust direction
+@x [47.1079] l.20920 begin_box - pTeX: disp_node, adjust direction
@!m:quarterword; {the length of a replacement list}
@y
@!r:pointer; {running behind |p|}
@@ -5126,6 +5156,12 @@ else begin if k=vmode then scan_spec(vbox_group,true)
push_nest; mode:=-k; adjust_dir:=a_dir;
@z
+@x [47.1083] reset inhibit_glue_flag
+else begin space_factor:=1000;
+@y
+else begin space_factor:=1000; inhibit_glue_flag:=false;
+@z
+
@x [47.1085] l.21031 - pTeX: end of box, call adjust_hlist
hbox_group: package(0);
adjusted_hbox_group: begin adjust_tail:=adjust_head; package(0);
@@ -5194,6 +5230,13 @@ push_nest; adjust_dir:=direction;
mode:=hmode; space_factor:=1000; set_cur_lang; clang:=cur_lang;
@z
+@x [47.???] indent_in_hmode: reset inhibit_glue_flag
+ if abs(mode)=hmode then space_factor:=1000
+@y
+ if abs(mode)=hmode then
+ begin space_factor:=1000; inhibit_glue_flag:=false; end
+@z
+
@x [47.1096] l.21155 - pTeX: end_graf, call adjust_hlist
begin if head=tail then pop_nest {null paragraphs are ignored}
else line_break(widow_penalty);
@@ -5203,10 +5246,11 @@ mode:=hmode; space_factor:=1000; set_cur_lang; clang:=cur_lang;
end;
@z
-@x [47.1099] l.21184 - pTeX: insert and adjust
+@x [47.1099] l.21184 begin_insert_or_adjust - pTeX: insert and adjust
new_save_level(insert_group); scan_left_brace; normal_paragraph;
push_nest; mode:=-vmode; prev_depth:=ignore_depth;
@y
+inhibit_glue_flag:=false;
new_save_level(insert_group); scan_left_brace; normal_paragraph;
push_nest; mode:=-vmode; direction:=adjust_dir; prev_depth:=ignore_depth;
@z
@@ -5266,9 +5310,10 @@ insert_group: begin end_graf; q:=split_top_skip; add_glue_ref(q);
end;
@z
-@x [47.1101] l.21214 - pTeX: mark_node, prev_append
+@x [47.1101] l.21214 make_mark - pTeX: mark_node, prev_append
mark_ptr(p):=def_ref; link(tail):=p; tail:=p;
@y
+inhibit_glue_flag:=false;
mark_ptr(p):=def_ref;
if not is_char_node(tail)and(type(tail)=disp_node) then
prev_append(p)
@@ -5283,6 +5328,7 @@ end;
@y
procedure append_penalty;
begin scan_int;
+ inhibit_glue_flag:=false;
if not is_char_node(tail)and(type(tail)=disp_node) then
prev_append(new_penalty(cur_val))
else tail_append(new_penalty(cur_val));
@@ -5327,7 +5373,7 @@ var p:pointer; {the box}
@!disp:scaled; {displacement}
@z
-@x [47.1110] l.21314 - pTeX: free box node, delete kanji_skip
+@x [47.1110] l.21314 unpackage - pTeX: free box node, delete kanji_skip
if (abs(mode)=mmode)or((abs(mode)=vmode)and(type(p)<>vlist_node))or@|
((abs(mode)=hmode)and(type(p)<>hlist_node)) then
begin print_err("Incompatible list can't be unboxed");
@@ -5376,28 +5422,38 @@ else
free_node(p,box_node_size);
end;
@z
+
@x [47.1110] l.22014 - pTeX: free box node, delete kanji_skip
while link(tail)<>null do tail:=link(tail);
@y
while link(tail)<>null do
+ {reset |inhibit_glue_flag| when a node other than |disp_node| is found;
+ |disp_node| is always inserted according to tex-jp-build issue 40}
begin p:=tail; tail:=link(tail);
- if not is_char_node(tail) then
+ if is_char_node(tail) then
+ inhibit_glue_flag:=false
+ else
case type(tail) of
- glue_node :
+ glue_node : begin
+ inhibit_glue_flag:=false;
if (subtype(tail)=kanji_skip_code+1)
or(subtype(tail)=xkanji_skip_code+1) then
begin link(p):=link(tail);
delete_glue_ref(glue_ptr(tail));
free_node(tail,small_node_size); tail:=p;
end;
- penalty_node :
+ end;
+ penalty_node : begin
+ inhibit_glue_flag:=false;
if subtype(tail)=widow_pena then
begin link(p):=link(tail); free_node(tail,small_node_size);
tail:=p;
end;
+ end;
disp_node :
begin prev_disp:=disp; disp:=disp_dimen(tail); prev_node:=p;
end;
+ othercases inhibit_glue_flag:=false;
endcases;
end;
@z
@@ -5441,6 +5497,16 @@ begin if tail<>head then
end;
@z
+@x [47.????] pTeX: reset inhibit_glue_flag at disc_node
+procedure append_discretionary;
+var c:integer; {hyphen character}
+begin tail_append(new_disc);
+@y
+procedure append_discretionary;
+var c:integer; {hyphen character}
+begin tail_append(new_disc); inhibit_glue_flag:=false;
+@z
+
@x pTeX: direction check in \discretionary
@!n:integer; {length of discretionary list}
@y
@@ -5470,6 +5536,12 @@ case saved(-1) of
end;
@z
+@x pTeX: reset inhibit_glue_flag
+push_nest; mode:=-hmode; space_factor:=1000;
+@y
+push_nest; mode:=-hmode; space_factor:=1000; inhibit_glue_flag:=false;
+@z
+
@x pTeX: direction check in \discretionary
else link(tail):=p;
if n<=max_quarterword then replace_count(tail):=n
@@ -5538,7 +5610,7 @@ else begin f:=cur_font; p:=new_character(f,cur_val);
link(tail):=p;
if link(p)<>null then tail:=link(p) else tail:=p;
@<Append |disp_node| at end of displace area@>;
- space_factor:=1000;
+ space_factor:=1000; inhibit_glue_flag:=false;
@z
@x [47.1124] l.22180 - pTeX: make_accent Kanji, insert disp_node
@@ -5754,7 +5826,6 @@ mmode+char_num: begin scan_char_num; cur_chr:=cur_val;
help1("IGNORE.");@/
error;
end;
- inhibit_glue_flag:=false;
@z
@x [48.1158] l.22690 - pTeX: scan_math
@@ -5776,14 +5847,6 @@ scan_math(nucleus(tail));
scan_math(nucleus(tail),kcode_noad(tail));
@z
-@x [48.1167] pTeX: vcenter, inhibit_glue_flag
-mmode+vcenter: begin scan_spec(vcenter_group,false); normal_paragraph;
-@y
-mmode+vcenter: begin
- scan_spec(vcenter_group,false); normal_paragraph;
- inhibit_glue_flag:=false;
-@z
-
@x [48.1164] l.22790 - pTeX: vcenter : dir
vcenter_group: begin end_graf; unsave; save_ptr:=save_ptr-2;
p:=vpack(link(head),saved(1),saved(0)); pop_nest;
@@ -5800,31 +5863,12 @@ vcenter_group: begin end_graf; unsave; save_ptr:=save_ptr-2;
end;
@z
-@x [48.1176] pTeX: sub_sup, inhibit_glue_flag
-procedure sub_sup;
-var t:small_number; {type of previous sub/superscript}
-@!p:pointer; {field to be filled by |scan_math|}
-begin t:=empty; p:=null;
-@y
-procedure sub_sup;
-var t:small_number; {type of previous sub/superscript}
-@!p:pointer; {field to be filled by |scan_math|}
-begin t:=empty; p:=null;
-inhibit_glue_flag:=false;
-@z
-
@x [48.1176] l.22864 - pTeX: scan_math
scan_math(p);
@y
scan_math(p,null);
@z
-@x [48.1181] pTeX: math_fraction, inhibit_glue_flag
-begin c:=cur_chr;
-@y
-begin c:=cur_chr; inhibit_glue_flag:=false;
-@z
-
@x [48.1186] l.23006 - pTeX: copy kanji code
if math_type(supscr(p))=empty then
begin mem[saved(0)].hh:=mem[nucleus(p)].hh;
@@ -5833,12 +5877,6 @@ begin c:=cur_chr; inhibit_glue_flag:=false;
begin mem[saved(0)].hh:=mem[nucleus(p)].hh;
@z
-@x [48.1191] pTeX: math_left_right, inhibit_glue_flag
-begin t:=cur_chr;
-@y
-begin t:=cur_chr; inhibit_glue_flag:=false;
-@z
-
@x [48.1194] l.23078 - pTeX: set cur_kanji_skip, cur_xkanji_skip
var l:boolean; {`\.{\\leqno}' instead of `\.{\\eqno}'}
@y
@@ -5876,14 +5914,14 @@ link(tail):=link(temp_head);
while link(tail)<>null do tail:=link(tail);
tail_append(new_math(math_surround,after));
@<Append |disp_node| at end of displace area@>;
-space_factor:=1000; unsave;
+space_factor:=1000; inhibit_glue_flag:=false; unsave;
end
@z
@x [48.1200] l.23203 - pTeX: adjust direction
push_nest; mode:=hmode; space_factor:=1000; set_cur_lang; clang:=cur_lang;
@y
-push_nest; adjust_dir:=direction;
+push_nest; adjust_dir:=direction; inhibit_glue_flag:=false;
mode:=hmode; space_factor:=1000; set_cur_lang; clang:=cur_lang;
@z
@@ -6251,6 +6289,15 @@ undump_things(char_base[null_font], font_ptr+1-null_font);
ctype_base[null_font]:=0; char_base[null_font]:=0; width_base[null_font]:=0;
@z
+@x [53.????] do_extension, inhibit_glue_flag
+begin case cur_chr of
+open_node:@<Implement \.{\\openout}@>;
+@y
+begin inhibit_glue_flag:=false;
+case cur_chr of
+open_node:@<Implement \.{\\openout}@>;
+@z
+
@x [53.1376] l.26309 - pTeX:
@<Glob...@> =
@!debug_format_file: boolean;
@@ -6419,23 +6466,20 @@ inserting a space between 2byte-char and 1byte-char.
@d new_pos=0
@d cur_pos=1
-@<Global...@>=
- inhibit_glue_flag:boolean;
-
-@ @<Set init...@>=
- inhibit_glue_flag:=false;
-
@ @<Cases of |main_control| that don't...@>=
- any_mode(inhibit_glue): inhibit_glue_flag:=true;
+ any_mode(inhibit_glue): inhibit_glue_flag:=(cur_chr=0);
@ @<Put each...@>=
primitive("inhibitglue",inhibit_glue,0);
@!@:inhibit_glue_}{\.{\\inhibitglue} primitive@>
+primitive("disinhibitglue",inhibit_glue,1);
+@!@:dis_inhibit_glue_}{\.{\\disinhibitglue} primitive@>
primitive("inhibitxspcode",assign_inhibit_xsp_code,inhibit_xsp_code_base);
@!@:inhibit_xsp_code_}{\.{\\inhibitxspcode} primitive@>
@ @<Cases of |print_cmd_chr|...@>=
-inhibit_glue: print_esc("inhibitglue");
+inhibit_glue: if (chr_code>0) then print_esc("disinhibitglue")
+ else print_esc("inhibitglue");
assign_inhibit_xsp_code: print_esc("inhibitxspcode");
@ @<Declare procedures needed in |scan_something_internal|@>=
@@ -7121,7 +7165,6 @@ written in section 48.
procedure set_math_kchar(@!c:integer);
var p:pointer; {the new noad}
begin p:=new_noad; math_type(nucleus(p)):=math_jchar;
-inhibit_glue_flag:=false;
character(nucleus(p)):=qi(0);
math_kcode(p):=c; fam(nucleus(p)):=cur_jfam;
if font_dir[fam_fnt(fam(nucleus(p))+cur_size)]=dir_default then
@@ -7201,9 +7244,9 @@ again_2:
end
else cur_l:=qi(get_jfm_pos(KANJI(cur_chr),main_f));
end;
- inhibit_glue: begin inhibit_glue_flag:=true; goto again_2; end;
+ inhibit_glue: begin inhibit_glue_flag:=(cur_chr=0); goto again_2; end;
othercases begin ins_kp:=max_halfword;
- cur_l:=qi(0); cur_r:=non_char; lig_stack:=null;
+ cur_l:=qi(-1); cur_r:=non_char; lig_stack:=null;
end;
endcases;
@#
@@ -7253,7 +7296,9 @@ end;
@ @<Look ahead for glue or kerning@>=
cur_q:=tail;
if inhibit_glue_flag<>true then
- begin if (tail=link(head))and(not is_char_node(tail))and(type(tail)=disp_node) then
+ begin { print("IF");print_int(cur_l); }
+ if cur_l<qi(0) then cur_l:=qi(0) else inhibit_glue_flag:=false;
+ if (tail=link(head))and(not is_char_node(tail))and(type(tail)=disp_node) then
goto skip_loop
else begin if char_tag(main_i)=gk_tag then
begin main_k:=glue_kern_start(main_f)(main_i);
@@ -7297,8 +7342,12 @@ if inhibit_glue_flag<>true then
end;
end;
end;
-end;
-skip_loop: inhibit_glue_flag:=false;
+end
+else
+ begin { print("IT");print_int(cur_l); }
+ if cur_l<qi(0) then cur_l:=qi(0) else inhibit_glue_flag:=false;
+ end;
+skip_loop: do_nothing;
@ @<Basic printing...@>=
procedure print_kanji(@!s:KANJI_code); {prints a single character}
diff --git a/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex b/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex
new file mode 100644
index 00000000000..2c76a9782a8
--- /dev/null
+++ b/Build/source/texk/web2c/ptexdir/tests/inhibitglue.tex
@@ -0,0 +1,220 @@
+%#!ptex2pdf -e inhibitglue.tex
+\parindent0pt
+\def\head#1{\par\noindent{\tentt ■\string#1}\par}
+\noautospacing \noautoxspacing
+
+%%% unexpandable tokens with non-discardable nodes
+
+\head{\null}
+あ)\inhibitglue (あ\par % ベタ
+あ)\null\inhibitglue (あ\par % 二分
+あ)\inhibitglue\null (あ\par % 二分
+あ)\null\inhibitglue\null (あ\par % 全角【TL17二分】
+あ)\null (あ\par % 全角
+
+\head{\unbox}
+\def\unbox{\unhcopy200 }
+\setbox200=\hbox{}
+あ)\inhibitglue (あ\par % ベタ
+あ)\unbox\inhibitglue (あ\par % 二分
+あ)\inhibitglue\unbox (あ\par % ベタ【TL17二分】
+あ)\unbox\inhibitglue\unbox (あ\par % 二分
+あ)\unbox (あ\par % 全角
+\setbox200=\hbox{漢}
+あ)\inhibitglue (あ\par % ベタ
+あ)\unbox\inhibitglue (あ\par % 前二分
+あ)\inhibitglue\unbox (あ\par % 後二分
+あ)\unbox\inhibitglue\unbox (あ\par % 前後二分【TL17前二分】
+あ)\unbox (あ\par % 前後二分
+
+\head{\vrule}
+あ)\inhibitglue (あ\par % ベタ
+あ)\vrule\inhibitglue (あ\par % 二分
+あ)\inhibitglue\vrule (あ\par % 二分
+あ)\vrule\inhibitglue\vrule (あ\par % 全角【TL17二分】
+あ)\vrule (あ\par % 全角
+
+\head{\discretionary}
+\def\disc{\discretionary{}{}{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\disc\inhibitglue (あ\par % 二分
+あ)\inhibitglue\disc (あ\par % 二分
+あ)\disc\inhibitglue\disc (あ\par % 全角【TL17二分】
+あ)\disc (あ\par % 全角
+
+\head{\special}
+\def\spec{\special{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\spec\inhibitglue (あ\par % 二分
+あ)\inhibitglue\spec (あ\par % 二分
+あ)\spec\inhibitglue\spec (あ\par % 全角【TL17二分】
+あ)\spec (あ\par % 全角
+
+\head{\write-1}
+\def\tlog{\write-1{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\tlog\inhibitglue (あ\par % 二分
+あ)\inhibitglue\tlog (あ\par % 二分
+あ)\tlog\inhibitglue\tlog (あ\par % 全角【TL17二分】
+あ)\tlog (あ\par % 全角
+
+\head{\insert}
+\def\ins{\insert201{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\ins (あ\par % 二分
+あ)\ins\inhibitglue (あ\par % 二分
+あ)\ins\inhibitglue\ins (あ\par % 全角【TL17二分】
+あ)\ins (あ\par % 全角
+
+\head{\mark}
+\def\mrk{\mark{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\mrk (あ\par % 二分
+あ)\mrk\inhibitglue (あ\par % 二分
+あ)\mrk\inhibitglue\mrk (あ\par % 全角【TL17二分】
+あ)\mrk (あ\par % 全角
+
+\head{\vadjust}
+\def\adj{\vadjust{}}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\adj (あ\par % 二分
+あ)\adj\inhibitglue (あ\par % 二分
+あ)\adj\inhibitglue\adj (あ\par % 全角【TL17二分】
+あ)\adj (あ\par % 全角
+
+\head{\math}
+\def\math{$ $}
+あ)\inhibitglue (あ\par % ベタ
+あ)\inhibitglue\math (あ\par % 二分
+あ)\math\inhibitglue (あ\par % 二分
+あ)\math\inhibitglue\math (あ\par % 全角【TL17二分】
+あ)\math (あ\par % 全角
+
+%%% unexpandable tokens with discardable nodes (glue, kern, penalty)
+
+\head{\hskip0pt}
+\def\zskip{\hskip0pt}
+あ)\inhibitglue (あ\par % ベタ
+あ)\zskip\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zskip (あ\par % 二分
+あ)\zskip\inhibitglue\zskip (あ\par % 全角
+あ)\zskip (あ\par % 全角
+
+\head{\kern0pt}
+\def\zkern{\kern0pt}
+あ)\inhibitglue (あ\par % ベタ
+あ)\zkern\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zkern (あ\par % 二分
+あ)\zkern\inhibitglue\zkern (あ\par % 全角
+あ)\zkern (あ\par % 全角
+
+\head{\penalty10000}
+\def\zpena{\penalty10000 }
+あ)\inhibitglue (あ\par % ベタ
+あ)\zpena\inhibitglue (あ\par % 二分
+あ)\inhibitglue\zpena (あ\par % 二分
+あ)\zpena\inhibitglue\zpena (あ\par % 全角【TL17二分】
+あ)\zpena (あ\par % 全角
+
+%%% unexpandable tokens
+
+\head{\relax}
+あ)\inhibitglue (あ\par % ベタ
+あ)\relax\inhibitglue (あ\par % 二分
+あ)\inhibitglue\relax (あ\par % ベタ【TL17二分】
+あ)\relax\inhibitglue\relax (あ\par % 二分
+あ)\relax (あ\par % 全角
+ああ\inhibitglue\relax (あ\par % ベタ【TL17二分】
+ああ\relax\inhibitglue (あ\par % ベタ
+あ)\relax\inhibitglue ああ\par % 二分
+あ)\inhibitglue\relax ああ\par % ベタ
+
+\head{\ignorespaces}
+\let\ignsp=\ignorespaces
+あ)\inhibitglue (あ\par % ベタ
+あ)\ignsp\inhibitglue (あ\par % 二分
+あ)\inhibitglue\ignsp (あ\par % ベタ【TL17二分】
+あ)\ignsp\inhibitglue\ignsp (あ\par % 二分
+あ)\ignsp (あ\par % 全角
+
+\head{\spacefactor1000}
+\def\spf{\spacefactor1000 }
+あ)\inhibitglue (あ\par % ベタ
+あ)\spf\inhibitglue (あ\par % 二分
+あ)\inhibitglue\spf (あ\par % ベタ【TL17二分】
+あ)\spf\inhibitglue\spf (あ\par % 二分
+あ)\spf (あ\par % 全角
+
+\head{\let}
+\def\letab{\let\a\b}
+あ)\inhibitglue (あ\par % ベタ
+あ)\letab\inhibitglue (あ\par % 二分
+あ)\inhibitglue\letab (あ\par % ベタ【TL17二分】
+あ)\letab\inhibitglue\letab (あ\par % 二分
+あ)\letab (あ\par % 全角
+
+%%% grouping
+
+\head{\group}
+あ)(あ\par % 一括
+あ){}(あ\par % 別々
+あ){}\inhibitglue (あ\par % 左
+あ)\inhibitglue {}(あ\par % なし【TL17右】
+あ){}\inhibitglue{}(あ\par % 左
+あ){\inhibitglue }(あ\par % 左
+あ)\inhibitglue (あ\par % なし
+あ)・あ\par % 一括
+あ){}・あ\par % 別々
+あ){}\inhibitglue ・あ\par % 左
+あ)\inhibitglue {}・あ\par % なし【TL17右】
+あ){}\inhibitglue{}・あ\par % 左
+あ){\inhibitglue }・あ\par % 左
+あ)\inhibitglue ・あ\par % なし
+あ・(あ\par % 一括
+あ・{}(あ\par % 別々
+あ・{}\inhibitglue (あ\par % 左
+あ・\inhibitglue {}(あ\par % なし【TL17右】
+あ・{}\inhibitglue{}(あ\par % 左
+あ・{\inhibitglue }(あ\par % 左
+あ・\inhibitglue (あ\par % なし
+
+
+\head{\inhibitglue\ at 内側リスト}
+あ\inhibitglue\setbox0=\vbox{『}(\par % ベタ【TL17二分】
+あ\setbox0=\hbox{\inhibitglue}(\par % 二分【TL17ベタ】
+)\setbox0=\hbox{\inhibitglue}(\par % 全角【TL17二分】
+
+あ\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:二分,「前:二分
+あ\setbox0=\vbox{\hsize10zw「\inhibitglue}(い\box0\par % (前:二分,「前:二分
+あ\inhibitglue\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:ベタ【TL17二分】,「前:二分
+あ\setbox0=\vbox{\hsize10zw\leavevmode\inhibitglue 「}(い\box0\par % (前:二分,「前:ベタ
+
+
+%%% \unskip vs \inhibitglue (e-pTeX \lastnodesubtype is required)
+\ifx\lastnodesubtype\undefined \expandafter\end \fi
+
+\head{\inhibitglue\ test}
+\setbox200=\hbox{)\hskip10pt\unskip
+ \xdef\gluetype{\the\lastnodetype}%
+ \xdef\jfmgluesubtype{\the\lastnodesubtype}}
+\protected\def\removejfmglue{%
+ \ifnum\lastnodetype=\gluetype\relax
+ \ifnum\lastnodesubtype=\jfmgluesubtype\relax
+ \unskip
+ \fi
+ \fi}
+
+あ)\inhibitglue あ\par % 消える
+あ)\relax\inhibitglue あ\par % 消えない
+あ)\relax\removejfmglue あ\par % 消える【新設】
+%% for tabular environment
+あ)\hskip20pt\unskip\unskip あ\par % 消える
+あ)\hskip20pt\unskip\inhibitglue あ\par % 消えない
+あ)\hskip20pt\unskip\removejfmglue あ\par % 消える【新設】
+
+
+%% reset \inhibitglue at char_node
+\vrule\inhibitglue ;あ( % ;前ベタ,;後四分
+
+
+\bye