artifact_id;status_id;status_name;priority;submitter_id;submitter_name;assigned_to_id;assigned_to_name;open_date;close_date;last_modified_date;summary;details;"Hardware";"Product";"Operating System";"Component";"Version";"Severity";"Resolution";"URL"
649;1;"Open";3;233;"Julien Signoles";100;"Nobody";"2010-05-31 12:44";"";"2010-05-31 12:44";"Bad color for multiple-line types";"val x: string -> string (* colors are OK *)
val y: string ->
          string (* color of this last line is KO: should be the same as the first occurrence of string *)

";"None";"None";"None";"None";"None";"None";"Accepted As Bug";""
727;1;"Open";3;665;"John Carr";100;"Nobody";"2010-08-25 19:23";"";"2011-11-29 03:11";"electricity: Weird behavior with quoted characters";"tuareg-mode version ""Tuareg Version 2.0.1 (unknown)"", emacs 23.2.1 from Debian

Put the cursor at the end of

let x = if true then ';'

and hit return.

You get

let x = if true then
* ';'

with ""*' representing the new cursor position.  If you get space the cursor jumps before the ';' without inserting a newline.

There is a similar bug with

let x = if true then ';' else '#'

";"PC";"None";"Linux";"None";"None";"minor";"Awaiting Response";""
750;1;"Open";3;665;"John Carr";100;"Nobody";"2010-09-13 16:09";"";"2011-12-08 19:59";"in_ indents oddly";"If I type ""in_"" the word jumps to the right when I type the ""_"" but goes back left if I hit tab to indent.

To see an example, create an empty file in tuareg mode and type 'i' 'n' '_'.  The word ""in_"" jumps two spaces to the right.  Hit tab and it jumps back to the left margin.

If you want a syntactically valid example, given

type foo={
in_

the word ""in_"" jumps to the right to line up with the open brace, but tab indents it only two spaces from the margin.

Apparently '_' causes the word ""in"" to be indented the same as if space were typed, but when '_' is added the result is no longer a keyword and should not be indented as one. ";"PC";"None";"Linux";"None";"None";"minor";"None";""
792;1;"Open";3;492;"Alessandro Baretta";100;"Nobody";"2010-10-29 23:02";"";"2010-10-29 23:02";"V.2.0.1: Wrong indentation for opening branch of function without pipe";"When using the function construct to introduce pattern matching, the optional initial pipe character is needed to get the appropriate indentation. This only happens with the function construct, not with match ... with or type definitions. Further, version 1.45.6 exhibited the correct behavior.

Here's an example:

type t =
    X (* Correct *)
  | Y

type s =
  | X'
  | Y'


let f = function
X -> 0 (* Wrong *)
  | Y -> 1

let g = function
  | X -> 2
  | Y -> 3

let f' x = match x with
    X -> 4 (* Correct *)
  | Y -> 5

let g' x = match x with
  | X -> 6
  | Y -> 7";"All";"None";"None";"None";"v1.1";"minor";"None";""
816;1;"Open";3;803;"Jacques Le Normand";100;"Nobody";"2010-11-28 04:56";"";"2011-12-08 19:59";"Symbol's function definition is void: nil";"The following code will not indent properly:

==begin==

let run ?f doc =     
  if ch = Key.down then down ()
    else if ch = Key.up then up ()

==end==

When trying to indent I get the following error:

Symbol's function definition is void: nil

I think tuareg somehow thinks that ""down"" is a keyword";"None";"None";"None";"None";"None";"None";"None";""
950;1;"Open";3;906;"Andrew J.";100;"Nobody";"2011-04-07 22:19";"";"2011-11-29 03:17";"Underscores, Keywords and Tuareg mode.";"Hi, and thanks for Tuareg mode!

I've noticed a somewhat annoying bug in Emacs Tuareg mode, but before reporting it as such I thought I'd better ask, to ensure that it's not a misconfiguration on my side. I posted in on the caml mailing list, and apparently others could reproduce it.

Basically, I can't use the do_list function at the beginning of a line. Whenever I type ""do"", and then press underscore, emacs emits a beep and the underscore is replaces by a white space. The same happens for keywords such as ""then"", ""else"", ""done"".

To reproduce, just try to input do_list in Emacs, with tuareg mode enabled, at the beginning of a line.

I imagine that this has to do with electric indenting, but, after carefully browsing tuareg source code, I couldn't locate the offending lines. 

---- Here's an emacs stack trace.
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  (let* ((looking-at-matching ...) (extra-unindent ...)) (+ (current-column) (tuareg-add-default-indent ...)))
  tuareg-compute-kwop-indent-general(""do"" nil)
  (cond ((string= kwop ""|"") (if real-pipe ... ... ...)) ((looking-at ""[[{(][<|]?\\|\\.<"") (tuareg-compute-paren-indent paren-match-p old-point)) ((string= kwop ""with"") (when ... ...) (while ... ... ...) (cond ... ... ...)) ((and ... ...) (tuareg-back-to-paren-or-indentation) (if ... ... ...)) ((or ... ...) (if ... ... ...)) ((string= kwop ""in"") (+ ... ...)) ((not ...) (tuareg-compute-kwop-indent-general kwop matching-kwop)) ((string= matching-kwop ""with"") (current-column)) (t (tuareg-paren-or-indentation-column)))
  (let* ((old-point ...) (paren-match-p ...) (real-pipe ...) (matching-kwop ...)) (cond (... ...) (... ...) (... ... ... ...) (... ... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))
  tuareg-compute-kwop-indent(""do"")
  (cond ((tuareg-in-comment-p) (cond ... ... ... ...)) ((tuareg-in-literal-p) (current-column)) ((or ... ...) (if ... ... ...)) ((or ... ...) (tuareg-find-phrase-indentation)) ((and tuareg-sig-struct-align ...) (if ... ... ...)) ((looking-at "";"") (tuareg-find-semicolon-match t)) ((looking-at ""|!"") (tuareg-indent-to-code ... ...)) ((looking-at "">>[=>|]"") (tuareg-indent-to-code ... ...)) ((or ... ... ...) 0) ((or ... ... ...) (tuareg-compute-kwop-indent ...)) (t (tuareg-compute-normal-indent)))
  (save-excursion (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... 0) (... ...) (t ...)))
  tuareg-compute-indent()
  (max 0 (tuareg-compute-indent))
  (indent-line-to (max 0 (tuareg-compute-indent)))
  (save-excursion (back-to-indentation) (indent-line-to (max 0 ...)))
  (progn (save-excursion (back-to-indentation) (indent-line-to ...)) (when (tuareg-in-indentation-p) (back-to-indentation)))
  (unwind-protect (progn (save-excursion ... ...) (when ... ...)) (modify-syntax-entry 46 ""."" tuareg-mode-syntax-table) (modify-syntax-entry 95 ""_"" tuareg-mode-syntax-table))
  (progn (modify-syntax-entry 46 ""w"" tuareg-mode-syntax-table) (modify-syntax-entry 95 ""w"" tuareg-mode-syntax-table) (unwind-protect (progn ... ...) (modify-syntax-entry 46 ""."" tuareg-mode-syntax-table) (modify-syntax-entry 95 ""_"" tuareg-mode-syntax-table)))
  (tuareg-with-internal-syntax (save-excursion (back-to-indentation) (indent-line-to ...)) (when (tuareg-in-indentation-p) (back-to-indentation)))
  (let ((case-fold-search nil)) (tuareg-with-internal-syntax (save-excursion ... ...) (when ... ...)))
  tuareg-indent-command(t)
  (if point-leading-comment nil (tuareg-indent-command t))
  (unless point-leading-comment (tuareg-indent-command t))
  (progn (when (and ... ...) (unless ... ...) (setq return-leading t)) (unless point-leading-comment (tuareg-indent-command t)))
  (if tuareg-electric-indent (progn (when ... ... ...) (unless point-leading-comment ...)))
  (when tuareg-electric-indent (when (and ... ...) (unless ... ...) (setq return-leading t)) (unless point-leading-comment (tuareg-indent-command t)))
  (save-excursion (back-to-indentation) (when tuareg-electric-indent (when ... ... ...) (unless point-leading-comment ...)))
  (let ((point-leading-comment ...) (return-leading nil)) (save-excursion (back-to-indentation) (when tuareg-electric-indent ... ...)) return-leading)
  tuareg-auto-fill-insert-leading-star()
  (if from-leading-star nil (tuareg-auto-fill-insert-leading-star))
  (unless from-leading-star (tuareg-auto-fill-insert-leading-star))
  tuareg-indent-command()
  indent-according-to-mode()
  (progn (insert "" "") (indent-according-to-mode) (backward-delete-char-untabify 1))
  (if kw (progn (insert "" "") (indent-according-to-mode) (backward-delete-char-untabify 1)))
  (when kw (insert "" "") (indent-according-to-mode) (backward-delete-char-untabify 1))
  (let* ((bol ...) (kw ...)) (when kw (insert "" "") (indent-according-to-mode) (backward-delete-char-untabify 1)))
  (if (tuareg-in-literal-or-comment-p) nil (let* (... ...) (when kw ... ... ...)))
  (unless (tuareg-in-literal-or-comment-p) (let* (... ...) (when kw ... ... ...)))
  tuareg-abbrev-hook()
  abbrev-insert(do #(""do"" 0 2 (fontified t face font-lock-keyword-face)) 1 3)
  #[nil ""\306 \211\211A@\211A@\211A@\211A@\203)";"None";"None";"All";"None";"None";"None";"None";""
959;1;"Open";3;146;"Gabriel Scherer";100;"Nobody";"2011-04-24 06:17";"";"2011-04-24 06:17";"interactive mode: eval-phrase determines wrong region for modules with both structure and signature";"Both the following code snippets fail when I try to send them to the toplevel using `tuareg-eval-phrase` :

    module A : sig
      val x : int
    end = struct
      let x = 0
    end


    module A = (
    struct
      let x = 0
    end
    :
    sig
      val x : int
    end)

In both cases, Tuareg only send the phrase upto the first ""end"", which results in syntax errors.";"None";"None";"None";"None";"None";"None";"None";""
1006;1;"Open";3;677;"Sean McLaughlin";677;"Sean McLaughlin";"2011-07-05 19:17";"";"2011-12-08 20:09";"record 'with' indentation ";"Hey, I've noticed what I think is less than optimal behavior with
regards to indentation of records.  In particular, I like to write
records with semicolons on the left, e.g.:

let record =
  { x = 3
  ; y = ()
  ; z = ""foo""
  }
in
...

which tuareg indents just fine.  However, if I instead try to use a with
statement, it looks more like this:

let record =
  { record with
    x = 3
    ; y = 5
    ; z = ""foo""
  }
in
";"None";"None";"None";"None";"None";"None";"None";""
1022;1;"Open";3;720;"Robin Green";100;"Nobody";"2011-08-01 20:47";"";"2011-11-29 03:19";"Wrong type argument: integerp, nil";"This error message occurs when I run camldebug-break on a buffer containing a .ml4 file.";"PC";"None";"Linux";"None";"None";"major";"Awaiting Response";""
1163;1;"Open";3;6652;"Marc Simpson";100;"Nobody";"2012-05-21 21:23";"";"2012-05-24 01:53";"Incorrect indentation of 'let...and...in' [trunk@r381]";"Please find attached a simple demonstration of the problem: when a multiline 'let...and...in' is not preceded by a line break, 'and' is (incorrectly) outdented (as seen in 'bar').

In the case of 'baz' (two 'let's), indentation behaves as expected.



";"None";"None";"None";"None";"None";"None";"None";""
1166;1;"Open";3;6820;"Mattias Engdegård";100;"Nobody";"2012-06-03 16:37";"";"2012-06-03 16:37";"wrong colour for type after ""and""";"In

type a = string and b = int

a is displayed in the ""type"" colour, but not b.

This is with tuareg 2.0.6.
";"None";"None";"None";"None";"None";"None";"None";""
1167;1;"Open";3;115;"Ralf Treinen";100;"Nobody";"2012-06-06 02:56";"";"2013-02-01 13:14";"sending tuareg mode into a loop";"This is tuareg-mode 2.0.6, with SMIE indentation switched on, GNU emacs 23.4.1

Open a buffer with extension .ml and type the following two lines:

let f = function
    [] -> 0

Then, at the beginning of the third line, hit the '|' key or a <TAB> key. This sends tuareg-mode into
a loop. If the second line starts with an '|' then everything is fine.

-Ralf";"None";"None";"Linux";"None";"None";"critical";"None";""
1173;1;"Open";3;115;"Ralf Treinen";100;"Nobody";"2012-06-12 19:44";"";"2012-06-12 19:44";"C-c <down-mouse-1> does not work";"The help text of tuareg-mode 2.0.6 says:

C-c <down-mouse-1>		caml-types-explore

However, after typing C-c it is not possible to mark a text with the mouse: I press down mouse button 1 and then try to drag the mouse but that does not leave any marking, and when I release the mouse I get in the message area:

Wrong type argument: string, 116

This is with tuareg-mode 2.0.6, GNU emacs 23";"None";"None";"None";"None";"None";"None";"None";""
1175;1;"Open";3;115;"Ralf Treinen";100;"Nobody";"2012-06-14 19:45";"";"2012-06-14 19:45";"emacs21: void-function tuareg-before-change-function";"Debian user Kevin Ryde <user42@zip.com.au> reports message

void-function tuareg-before-change-function

obtained with emacs21. He adds:

tuareg-mode has

  (unless tuareg-use-syntax-ppss
    (add-hook 'before-change-functions 'tuareg-before-change-function nil t))

but doesn't seem to define a `tuareg-before-change-function'.

This only affects emacs21 where there's no `syntax-ppss'.  I presume
tuareg.el is more or less meant to work without syntax-ppss, in as much
as the code in several places checks tuareg-use-syntax-ppss.  But I
can't tell what this before-change might be meant to be.";"None";"None";"None";"None";"None";"None";"None";""
1182;1;"Open";3;7146;"Max Prozorov";100;"Nobody";"2012-07-01 05:44";"";"2012-07-01 05:44";"underscore moved in syntax table after pressing Tab";"1) open a buffer with tuareg mode
2) evaluate (modify-syntax-entry ?_ ""w"") to make underscore a word char.
3) write in the buffer:
do_one_iter
4) move cursor back and forth with M-f and M-b
'_' is regarded as a word char. The excerpt from syntax table:
_ w which means: word

5) press <TAB> (to indent the line. The place where cursor is
placed in the buffer doesn't matter)
6) move cursor back and forth with M-f and M-b
'_' is regarded as a symbol char (not a word char). The excerpt from syntax table:
_ _ which means: symbol


GNU Emacs 23.4.1
Tuareg Version 2.0.6";"None";"None";"None";"None";"None";"None";"None";""
1183;1;"Open";3;7256;"Leo White";100;"Nobody";"2012-07-05 16:05";"";"2012-07-05 16:05";"Imenu fails for simple example";"
Calling Imenu on this code with version 2.0.6:

-----------------------------------
  type foo = {
    a : bool;
  }

  and bar = bool
-----------------------------------

Produces an error message:  up-list: Scan error: ""Unbalanced parentheses"", 26, 14

It seems to be connected to narrowing.";"None";"None";"None";"None";"None";"normal";"None";""
1221;1;"Open";3;6652;"Marc Simpson";100;"Nobody";"2012-09-24 08:27";"";"2012-09-24 08:27";"SMIE: Incorrect indentation of 'type...and' (r455, HEAD)";"SMIE incorrectly indents (and colours—see #1166) type definitions introduced with 'and'. Re-indentation of the region resolves the problem by right-aligning 'type' and 'and' (though the face is still incorrect). 

Please find an example attached.";"None";"None";"None";"None";"None";"normal";"None";""