aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-04 14:38:48 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-04 14:52:37 +0200
commit8155ba54ae39dd71c6b8ddff2b2b7353dde9aff8 (patch)
tree94b2b61cd034873c537b7991cdbe6312fdad2fb3 /ide
parent3e0334dd48b5d0b03046d0aff1a82867dc98d656 (diff)
parente0ad7ac11b97f089fa862d2e34409e0a1d77d3a1 (diff)
Merge branch 'v8.6'
Diffstat (limited to 'ide')
-rw-r--r--ide/ide_slave.ml9
-rw-r--r--ide/preferences.ml8
2 files changed, 10 insertions, 7 deletions
diff --git a/ide/ide_slave.ml b/ide/ide_slave.ml
index d42364001..cb2b365a4 100644
--- a/ide/ide_slave.ml
+++ b/ide/ide_slave.ml
@@ -20,9 +20,8 @@ module CompactedDecl = Context.Compacted.Declaration
(** Ide_slave : an implementation of [Interface], i.e. mainly an interp
function and a rewind function. This specialized loop is triggered
- when the -ideslave option is passed to Coqtop. Currently CoqIDE is
- the only one using this mode, but we try here to be as generic as
- possible, so this may change in the future... *)
+ when the -ideslave option is passed to Coqtop. *)
+
(** Signal handling: we postpone ^C during input and output phases,
but make it directly raise a Sys.Break during evaluation of the request. *)
@@ -65,7 +64,7 @@ let is_known_option cmd = match cmd with
(** Check whether a command is forbidden in the IDE *)
let ide_cmd_checks ~id (loc,ast) =
- let user_error s = CErrors.user_err ?loc ~hdr:"CoqIde" (str s) in
+ let user_error s = CErrors.user_err ?loc ~hdr:"IDE" (str s) in
let warn msg = Feedback.(feedback ~id (Message (Warning, loc, strbrk msg))) in
if is_debug ast then
user_error "Debug mode not available in the IDE";
@@ -509,4 +508,4 @@ let () = Coqtop.toploop_run := loop
let () = Usage.add_to_usage "coqidetop"
" --xml_format=Ppcmds serialize pretty printing messages using the std_ppcmds format\
-\n --help-XML-protocol print the documentation of the XML protocol used by CoqIDE\n"
+\n --help-XML-protocol print documentation of the Coq XML protocol\n"
diff --git a/ide/preferences.ml b/ide/preferences.ml
index 95c03b9fc..7c251f79c 100644
--- a/ide/preferences.ml
+++ b/ide/preferences.ml
@@ -407,11 +407,15 @@ let opposite_tabs =
let background_color =
new preference ~name:["background_color"] ~init:"cornsilk" ~repr:Repr.(string)
+let attach_tag (pref : string preference) (tag : GText.tag) f =
+ tag#set_property (f pref#get);
+ pref#connect#changed ~callback:(fun c -> tag#set_property (f c))
+
let attach_bg (pref : string preference) (tag : GText.tag) =
- pref#connect#changed ~callback:(fun c -> tag#set_property (`BACKGROUND c))
+ attach_tag pref tag (fun c -> `BACKGROUND c)
let attach_fg (pref : string preference) (tag : GText.tag) =
- pref#connect#changed ~callback:(fun c -> tag#set_property (`FOREGROUND c))
+ attach_tag pref tag (fun c -> `FOREGROUND c)
let processing_color =
new preference ~name:["processing_color"] ~init:"light blue" ~repr:Repr.(string)