From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Taglet 1.2
Date: Wed, 27 Aug 2003 13:20:32 +0200 [thread overview]
Message-ID: <16204.37888.251988.65626@ithif51.inf.tu-dresden.de> (raw)
In-Reply-To: <3F4C4CFB.9040108@ucdavis.edu>
[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 949 bytes --]
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<CR> ??
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
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 3191 bytes --]
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), "<str> output tags file (default: TAGS) (use - for standard output)");
***************
*** 66,71 ****
--- 68,75 ----
("-camlp4", Arg.String ((:=) rcamlp4), "<str> camlp4 command (default: camlp4)");
("-pa", Arg.String add_parser, "<str> 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
next prev parent reply other threads:[~2003-08-27 11:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 6:17 Issac Trotts
2003-08-27 11:20 ` Hendrik Tews [this message]
2003-08-27 17:40 ` Issac Trotts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16204.37888.251988.65626@ithif51.inf.tu-dresden.de \
--to=tews@tcs.inf.tu-dresden.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox