From 2a316e93d95450aa88a6de485cc6cc5ceb27ac41 Mon Sep 17 00:00:00 2001 From: malc Date: Fri, 25 May 2018 19:54:27 +0300 Subject: [PATCH] Cosmetics --- main.ml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/main.ml b/main.ml index 7901a5b..a666557 100644 --- a/main.ml +++ b/main.ml @@ -1583,21 +1583,20 @@ let linknact f s = ) ;; -let linknentry text = - function [@warning "-4"] - | Keys.Ascii c -> - let text = addchar text c in - linknact (fun under -> state.text <- undertext under) text; - TEcont text - | _ -> - state.text <- Printf.sprintf "invalid key"; - TEcont text -;; - -let textentry text = function [@warning "-4"] - | Keys.Ascii c -> TEcont (addchar text c) - | Keys.Code c -> TEcont (text ^ toutf8 c) - | _ -> TEcont text +let linknentry text key = match [@warning "-4"] key with + | Keys.Ascii c -> + let text = addchar text c in + linknact (fun under -> state.text <- undertext under) text; + TEcont text + | _ -> + state.text <- Printf.sprintf "invalid key"; + TEcont text +;; + +let textentry text key = match [@warning "-4"] key with + | Keys.Ascii c -> TEcont (addchar text c) + | Keys.Code c -> TEcont (text ^ toutf8 c) + | _ -> TEcont text ;; let reqlayout angle fitmodel = -- 2.11.4.GIT