-local wt
-
-local function suppress_hyphenate_ja(head)
- local non_math, p = true, head
- wt = {}
- while p do
- local pid = p.id
- if pid == id_glyph then
- if (has_attr(p, attr_icflag) or 0)<=0 and ltjc_is_ucs_in_japanese_char(p) then
- local pf = has_attr(p, attr_curjfnt) or p.font
- p.font = pf
- p.subtype = floor(p.subtype*0.5)*2
- set_attr(p, attr_orig_char, p.char)
- if ltjf_font_metric_table[pf] and ltjf_font_metric_table[pf].mono_flag then
- local pco = fonts_ids[pf].cidinfo.ordering
- for i,v in pairs(fwglyph) do
- if pco == i then
- local fwc = fonts_ids[pf].unicodes[pco .. '.'.. tostring(v[p.char])]
- if fwc then p.char = fwc end
- break
- end
- end
+local wt, wtd = {}, {}
+do
+ local ltjd_get_dir_count = ltjd.get_dir_count
+ local start_time_measure, stop_time_measure
+ = ltjb.start_time_measure, ltjb.stop_time_measure
+ local head
+ local suppress_hyphenate_ja_aux = {}
+ suppress_hyphenate_ja_aux[id_glyph] = function(p)
+ if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p) then
+ local pc = getchar(p)
+ local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
+ setfield(p, 'font', pf); setfield(p, 'lang', lang_ja)
+ ltjs_orig_char_table[p] = pc
+ end
+ return p
+ end
+ suppress_hyphenate_ja_aux[id_math] = function(p)
+ return node_end_of_math(node_next(p)) end
+ suppress_hyphenate_ja_aux[50] = function(p) return p end
+ suppress_hyphenate_ja_aux[id_whatsit] = function(p)
+ if getsubtype(p)==sid_user then
+ local uid = getfield(p, 'user_id')
+ if uid==STCK then
+ wt[#wt+1] = p; node_remove(head, p)
+ elseif uid==DIR then
+ if has_attr(p, attr_icflag)<PROCESSED_BEGIN_FLAG then
+ ltjs.list_dir = has_attr(p, attr_dir)
+ else
+ wtd[#wtd+1] = p; node_remove(head, p)