let edit_options param =
  let col_o = C.color ~f: color_output#set
      param#s_color_output color_output#get
  in
  let col_er = C.color ~f: color_error#set
      param#s_color_error_background color_error#get
  in
  let elements_frame_width = C.string
      ~f: (fun n -> try elements_frame_width#set (int_of_string n) with _ -> ())
      param#s_elements_frame_width (string_of_int elements_frame_width#get)
  in
  let display_frame_width = C.string
      ~f: (fun n -> try display_frame_width#set (int_of_string n) with _ -> ())
      param#s_display_frame_width (string_of_int display_frame_width#get)
  in
  let output_frame_height = C.string
      ~f: (fun n -> try output_frame_height#set (int_of_string n) with _ -> ())
      param#s_output_frame_height (string_of_int output_frame_height#get)
  in
  let (param_syntax, f_restore_syntax) = syntax_highlight_box param in
  let (param_svprops, f_restore_svprops) = source_view_props_box () in
  let sections =
    [
      C.Section ("Base",
                 [ col_o ; col_er ;
                   elements_frame_width ; display_frame_width ;
                   output_frame_height
                 ]) ;
      C.Section ("Source views", [param_svprops]) ;
      C.Section ("Syntax highlighting", [param_syntax]) ;
    ]
  in
  match C.get param#s_configuration sections with
    C.Return_ok -> save_options param#ini_file ; true
  | _ -> f_restore_syntax (); f_restore_svprops () ; false