From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA02350; Wed, 27 Aug 2003 13:20:38 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA27355 for ; Wed, 27 Aug 2003 13:20:37 +0200 (MET DST) Received: from tcs.inf.tu-dresden.de (orchid.inf.tu-dresden.de [141.76.75.101]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h7RBKbT08811 for ; Wed, 27 Aug 2003 13:20:37 +0200 (MET DST) Received: from ithif51 (ithif51 [141.76.75.51]) by tcs.inf.tu-dresden.de (8.12.9/8.12.9) with ESMTP id h7RBKWub000753 for ; Wed, 27 Aug 2003 13:20:32 +0200 (MET DST) Received: from tews by ithif51 with local (Exim 3.36 #1 (Debian)) id 19ryLo-0005SM-00 for ; Wed, 27 Aug 2003 13:20:32 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+Q6sYHQeAr" Content-Transfer-Encoding: 7bit Message-ID: <16204.37888.251988.65626@ithif51.inf.tu-dresden.de> Date: Wed, 27 Aug 2003 13:20:32 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Taglet 1.2 In-Reply-To: <3F4C4CFB.9040108@ucdavis.edu> References: <3F4C4CFB.9040108@ucdavis.edu> X-Mailer: VM 7.16 under Emacs 21.2.1 From: Hendrik Tews X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) at tcs.inf.tu-dresden.de X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 hendrik:01 tews:01 tews:01 issac:01 trotts:01 mli:01 mli:01 otags:01 uninitiated:01 otags:01 camlp:01 camlp:01 hendrik:01 privat:01 X-Attachments: name="patch" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --+Q6sYHQeAr Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Issac Trotts writes: Taglet makes a tag file that just lists all the .mli files, which reduces the number of redundant tags and helps you get the I agree that the redundent tags for *mli files could be annoying. However, with emacs I just hit M-, to cycle through all matching tags. So maybe you only need a key binding for :tn ?? I would like add its functionality to otags, but I haven't yet figured out how to do it. Even if I do, Taglet will still be useful and easy to understand on its own. Otags' architecture is a bit complicated, it does not really invite the uninitiated for hacking. To add your wishes to otags you have to: - add an option to the driver in otags.ml - arrange that the new option will passed to camlp4 - declare the option in one of the camlp4 modules - program your wishes There is a patch below with the necessary changes. The name of the option is -mli-only-module. Bye, Hendrik --+Q6sYHQeAr Content-Type: text/plain Content-Disposition: inline; filename="patch" Content-Transfer-Encoding: 7bit Index: otags.ml =================================================================== RCS file: /sun/theorie/tews/Privat/Store/Otags/otags.ml,v retrieving revision 1.1.1.6 diff -c -r1.1.1.6 otags.ml *** otags.ml 27 Aug 2003 07:49:39 -0000 1.1.1.6 --- otags.ml 27 Aug 2003 08:23:42 -0000 *************** *** 36,42 **** end (* Parsing arguments *) ! let verbose, output, recursive, editor, targets, suffixes, camlp4, parsers, with_quotations = let rverbose = ref false in let routput = ref "" in let rrecursive = ref false in --- 36,42 ---- end (* Parsing arguments *) ! let verbose, output, recursive, editor, targets, suffixes, camlp4, parsers, with_quotations, mli_only_module = let rverbose = ref false in let routput = ref "" in let rrecursive = ref false in *************** *** 53,58 **** --- 53,60 ---- let rquotation = ref false in + let rmli_only_module = ref false in + let usage = [ ("-v", Arg.Set rverbose, " verbose, display debug messages"); ("-o", Arg.String ((:=) routput), " output tags file (default: TAGS) (use - for standard output)"); *************** *** 66,71 **** --- 68,75 ---- ("-camlp4", Arg.String ((:=) rcamlp4), " camlp4 command (default: camlp4)"); ("-pa", Arg.String add_parser, " add camlp4 parser (default: pa_o.cmo; pa_op.cmo)"); ("-q", Arg.Set rquotation, " accept quotations in input"); + ("-mli-only-module", Arg.Set rmli_only_module, + " generate only the module tag for interfaces"); ("-version", Arg.Unit print_version, " display otags version number"); ] in Arg.parse usage add_target "Available commands:"; *************** *** 81,91 **** else !routput in !rverbose, output, !rrecursive, !reditor, ! targets (), Suffix.contents (), !rcamlp4, parsers, !rquotation let camlp4_libs pr_tags = parsers @ [ pr_tags ] ! let camlp4_options () = if with_quotations then ["-with-quotations"] else [] let debug prog args ofile = if verbose then begin --- 85,99 ---- else !routput in !rverbose, output, !rrecursive, !reditor, ! targets (), Suffix.contents (), !rcamlp4, parsers, !rquotation, ! !rmli_only_module let camlp4_libs pr_tags = parsers @ [ pr_tags ] ! let camlp4_options () = ! (if with_quotations then ["-with-quotations"] else []) ! @ ! (if mli_only_module then ["-mli-only-module"] else []) let debug prog args ofile = if verbose then begin Index: pr.ml =================================================================== RCS file: /sun/theorie/tews/Privat/Store/Otags/pr.ml,v retrieving revision 1.1.1.5 diff -c -r1.1.1.5 pr.ml *** pr.ml 27 Aug 2003 07:49:39 -0000 1.1.1.5 --- pr.ml 27 Aug 2003 08:50:02 -0000 *************** *** 198,203 **** --- 198,207 ---- let _ = Plexer.no_quotations := true let _ = Pcaml.add_option "-with-quotations" (Arg.Clear Plexer.no_quotations) "Enable quotation parsing" + + let _ = Pcaml.add_option "-mli-only-module" + (Arg.Unit (fun () -> Pcaml.print_interf := (fun _ -> ()))) + "do not process interface content" end --+Q6sYHQeAr-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners