Commits

Anonymous committed 6b5ca1c

resigned 2924d513eff9 from j

  • Participants
  • Parent commits 955d34d
  • Branches j

Comments (0)

Files changed (3)

File ocamlspot/ocamlspot.el

 ;   (add-hook 'tuareg-mode-hook 
 ;   	  '(lambda ()
 ; 	     (local-set-key "\C-c;" 'ocamlspot-query)
-; 	     (local-set-key "\C-c:" 'ocamlspot-query-interface)
 ; 	     (local-set-key "\C-c\C-t" 'ocamlspot-type)
 ;            (local-set-key "\C-c\C-y" 'ocamlspot-type-and-copy)
 ; 	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
   ; I dunno why but we need the following line to list-buffers work nicely
   (select-window sel-window)))
 
-; CR dup code
-(defun ocamlspot-query-interface ()
-  (interactive)
-  (let ((sel-window (selected-window)))
-  (save-selected-window
-    (if (ocamlspot-gen-query '("--interface"))
-        (progn ;save-excursion
-          ;; search the result
-          (ocamlspot-find-spot-in-buffer)))
-    (ocamlspot-delete-overlays)) ; CR jfuruse: it depends on one's taste
-  ; I dunno why but we need the following line to list-buffers work nicely
-  (select-window sel-window)))
-
 (defun ocamlspot-type (&optional to-kill)
   (interactive)
   (if (ocamlspot-gen-query '("-n"))

File ocamlspot/ocamlspot.ml

   let no_definition_analysis = ref false
   let strict_time_stamp = ref false
   let print_file_info = ref false
-  let print_interface = ref false
 
   let _ = 
     Arg.parse 
         "--dump-top", Arg.Set dump_top, " dump top"; 
         "--dump-flat", Arg.Set dump_flat, " dump flat"; 
         "--eager-dump", Arg.Set eager_dump, " eager evaluation at dump";
-
         "-n", Arg.Set no_definition_analysis, " no definition analysis";
-        "--no-analysis", Arg.Set no_definition_analysis, " no definition analysis";
-        
+        "--strict-time-stamp", Arg.Set strict_time_stamp, " error at newer source files than their spots";
         "-i", Arg.Set print_file_info, " print file information";
-        "--info", Arg.Set print_file_info, " print file information";
-
-        "--interface", Arg.Set print_interface, " show the interface rather than the definition";
-
-        "--strict-time-stamp", Arg.Set strict_time_stamp, " error at newer source files than their spots";
       ]
       (fun s -> 
 	match !spec with
   let no_definition_analysis = !no_definition_analysis
   let strict_time_stamp = !strict_time_stamp
   let print_file_info = !print_file_info
-  let print_interface = !print_interface
-
+      
   let dump_any = 
     dump_file (* ? dump_file *) || dump_lannots || dump_tree || dump_top || dump_flat
 
   module Load : sig
     exception Old_spot of string (* spot *) * string (* source *)
     val load : load_paths:string list -> string -> file
-    val load_module : ?spit:bool -> load_paths:string list -> string -> file
+    val load_module : load_paths:string list -> string -> file
   end = struct
 
     let check_time_stamp ~spot source =
           | None -> raise e
 
     (* CR jfuruse: searching algorithm must be reconsidered *)        
-    let load_module ?(spit=false) ~load_paths name =
-      let spotname = name ^ if spit then ".spit" else ".spot" in
+    let load_module ~load_paths name =
+      let spotname = name ^ ".spot" in
       try
         load ~load_paths spotname
       with
       | Failure s ->
-	  let spitname = name ^ if spit then ".spot" else ".spit" in
+	  let spitname = name ^ ".spit" in
           Format.printf "%s load failed. Try to load %s@."
             spotname spitname;
           try
 
   let str_of_global_ident ~load_paths id =
     assert (Ident.global id);
-    let file = Load.load_module ~spit:Config.print_interface ~load_paths (Ident0.name id) in
+    let file = Load.load_module ~load_paths (Ident0.name id) in
     file.path,
     Eval.structure (empty_env file) file.top
 

File typing/typemod.ml

         | Psig_value(name, sdesc) ->
             let desc = Typedecl.transl_value_decl env sdesc in
             let (id, newenv) = Env.enter_value name desc env in
+	    (* CR jfuruse : todo 
             Spot.Annot.record item.psig_loc
-              (Spot.Annot.Str (Spot.Abstraction.Str_value id));
-	    (* CR jfuruse : or, (Spot.Annot.Use (Spot.Kind.Value, ...)) ?? *) 
+	      (Spot.Annot.Use (Spot.Kind.Value, ...)); 
+	    *)
             let rem = transl_sig newenv srem in
             Tsig_value(id, desc) :: rem
         | Psig_type sdecls ->