diff options
| author | pboutill | 2011-01-07 14:26:12 +0000 |
|---|---|---|
| committer | pboutill | 2011-01-07 14:26:12 +0000 |
| commit | c8fee844b934dd79acbd64936a33b5fa654ef47a (patch) | |
| tree | 0c781c146b17f9f43d0ec539ea400acdc1f0d87f | |
| parent | c43d8bee7bb4461eb5775f75f3b9f79c75360f8a (diff) | |
Fix print in coqide
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13774 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | ide/coqide.ml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml index 8845cade09..f99f2526fb 100644 --- a/ide/coqide.ml +++ b/ide/coqide.ml @@ -1564,12 +1564,13 @@ let choose_save session = let do_print session = let av = session.analyzed_view in - if session.filename = "" - then flash_info "Cannot print: this buffer has no name" - else begin + match av#filename with + |None -> flash_info "Cannot print: this buffer has no name" + |Some f_name -> begin let cmd = - "cd " ^ Filename.quote (Filename.dirname session.filename) ^ "; " ^ - !current.cmd_coqdoc ^ " -ps " ^ Filename.quote (Filename.basename session.filename) ^ + "cd " ^ Filename.quote (Filename.dirname f_name) ^ "; " ^ + !current.cmd_coqdoc ^ "--coqlib_path " ^Envars.coqlib () ^ + " -ps " ^ Filename.quote (Filename.basename f_name) ^ " | " ^ !current.cmd_print in let print_window = GWindow.window ~title:"Print" ~modal:true ~position:`CENTER ~wm_class:"CoqIDE" ~wm_name: "CoqIDE" () in @@ -1829,7 +1830,8 @@ let main files = in let cmd = "cd " ^ Filename.quote (Filename.dirname f) ^ "; " ^ - !current.cmd_coqdoc ^ " --" ^ kind ^ " -o " ^ (Filename.quote output) ^ " " ^ (Filename.quote basef) + !current.cmd_coqdoc ^ "--coqlib_path " ^Envars.coqlib () ^ " --" ^ kind ^ + " -o " ^ (Filename.quote output) ^ " " ^ (Filename.quote basef) in let s,_ = run_command av#insert_message cmd in flash_info (cmd ^ |
