Browse Source

Improve code conciseness

Leo 9 years ago
parent
commit
1ae3e0506a
1 changed files with 8 additions and 7 deletions
  1. 8 7
      src/command_def.ml

+ 8 - 7
src/command_def.ml

@@ -65,20 +65,21 @@ let shared_params =
            Signals.handle ();
            Signals.handle ();
 
 
          (* Debugging *)
          (* Debugging *)
-         Messages.debug (sprintf "Verbosity set to %i" !Const.verbosity);
-         Messages.debug (sprintf "Color %s" (match !Const.no_color with true -> "off" | false -> "on"));
+         let d = Messages.debug in
+         d (sprintf "Verbosity set to %i" !Const.verbosity);
+         d (sprintf "Color %s" (match !Const.no_color with true -> "off" | false -> "on"));
          begin
          begin
          match Lazy.is_val !Const.rc_file with
          match Lazy.is_val !Const.rc_file with
-         | false -> Messages.debug "RC file will fail";
-         | true -> Messages.debug (sprintf "Configuration file is %s"
+         | false -> d "RC file will fail";
+         | true -> d (sprintf "Configuration file is %s"
            (Lazy.force !Const.rc_file));
            (Lazy.force !Const.rc_file));
          end;
          end;
-         Messages.debug (sprintf "Tmp file is %s" Const.tmp_file);
+         d (sprintf "Tmp file is %s" Const.tmp_file);
 
 
          (* Obtain data from rc_file *)
          (* Obtain data from rc_file *)
-         Messages.debug "Reading rc_file...";
+         d "Reading rc_file...";
          let rc_content = lazy (File_com.init_rc ()) in
          let rc_content = lazy (File_com.init_rc ()) in
-         Messages.debug "Read rc_file";
+         d "Read rc_file";
          { rc = rc_content } (* We use type for futur use *)
          { rc = rc_content } (* We use type for futur use *)
        )
        )
   (* Flag to set verbosity level *)
   (* Flag to set verbosity level *)