fix whitespace and over-long lines

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13428 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2013-03-22 18:19:29 +00:00
parent 44d2d94fe5
commit 18962fdd15
4 changed files with 18 additions and 9 deletions

View File

@ -140,11 +140,13 @@
(defconst caml-font-ident-re
"[A-Za-z_\300-\326\330-\366\370-\377][A-Za-z_\300-\326\330-\366\370-\377'0-9]*"
(concat "[A-Za-z_\300-\326\330-\366\370-\377]"
"[A-Za-z_\300-\326\330-\366\370-\377'0-9]*")
)
(defconst caml-font-int-re
"\\(0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\\|0[oO][0-7][0-7_]*\\|0[bB][01][01_]*\\)[lLn]?"
(concat "\\(0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\\|0[oO][0-7][0-7_]*"
"\\|0[bB][01][01_]*\\)[lLn]?")
)
; decimal integers are folded into the RE for floats to get longest-match
@ -160,7 +162,9 @@
; match any char token
(defconst caml-font-char-re
"'\\(\015\012\\|[^\\']\\|\\(\\\\\\([\\'\"ntbr ]\\|[0-9][0-9][0-9]\\|x[0-9A-Fa-f][0-9A-Fa-f]\\)\\)\\)'"
(concat "'\\(\015\012\\|[^\\']\\|"
"\\(\\\\\\([\\'\"ntbr ]\\|[0-9][0-9][0-9]"
"\\|x[0-9A-Fa-f][0-9A-Fa-f]\\)\\)\\)'")
)
; match a quote followed by a newline

View File

@ -788,6 +788,7 @@ variable caml-mode-indentation."
;; In Emacs 19, the regexps in compilation-error-regexp-alist do not
;; match the error messages when the language is not English.
;; Hence we add a regexp.
;; FIXME do we (still) have i18n of error messages ???
(defconst caml-error-regexp
"^[ A-\377]+ \"\\([^\"\n]+\\)\", [A-\377]+ \\([0-9]+\\)[-,:]"
@ -797,7 +798,8 @@ variable caml-mode-indentation."
;; We will adapt OCaml to output error messages in a compatible format.
;; In the meantime we add the new format here in addition to the old one.
(defconst caml-error-regexp-newstyle
"^[ A-\377]+ \"\\([^\"\n]+\\)\", line \\([0-9]+\\), char \\([0-9]+\\) to line \\([0-9]+\\), char \\([0-9]+\\):"
(concat "^[ A-\377]+ \"\\([^\"\n]+\\)\", line \\([0-9]+\\),"
"char \\([0-9]+\\) to line \\([0-9]+\\), char \\([0-9]+\\):")
"Regular expression matching the error messages produced by ocamlc/ocamlopt.")
(if (boundp 'compilation-error-regexp-alist)

View File

@ -96,8 +96,8 @@ The following commands are available:
\\[camldebug-display-frame] displays in the other window
the last line referred to in the camldebug buffer.
\\[camldebug-step], \\[camldebug-back] and \\[camldebug-next], in the camldebug window,
call camldebug to step, backstep or next and then update the other window
\\[camldebug-step], \\[camldebug-back] and \\[camldebug-next], in the camldebug
window,call camldebug to step, backstep or next and then update the other window
with the current file and position.
If you are in a source file, you may select a point to break
@ -250,7 +250,8 @@ representation is simply concatenated with the COMMAND."
camldebug-goto-position
"-[0-9]+[ \t]*\\(before\\).*\n")
camldebug-filter-accumulator)
(string-match (concat "\\(\n\\|\\`\\)[ \t]*\\([0-9]+\\)[ \t]+[0-9]+-"
(string-match (concat "\\(\n\\|\\`\\)[ \t]*\\([0-9]+\\)"
"[ \t]+[0-9]+-"
camldebug-goto-position
"[ \t]*\\(after\\).*\n")
camldebug-filter-accumulator)))
@ -710,7 +711,8 @@ Obeying it means displaying in another window the specified file and line."
;;; Miscellaneous.
(defun camldebug-module-name (filename)
(substring filename (string-match "\\([^/]*\\)\\.ml$" filename) (match-end 1)))
(substring filename (string-match "\\([^/]*\\)\\.ml$" filename)
(match-end 1)))
;;; The camldebug-call function must do the right thing whether its
;;; invoking keystroke is from the camldebug buffer itself (via

View File

@ -280,7 +280,8 @@ should lies."
(column (- (match-end 3) (match-beginning 3)))
(width (- (match-end 2) (match-end 3))))
(if (string-match "^\\(.*\\)[<]EOF[>]$" expr)
(setq expr (substring expr (match-beginning 1) (match-end 1))))
(setq expr (substring expr (match-beginning 1)
(match-end 1))))
(switch-to-buffer buf)
(re-search-backward
(concat "^" (regexp-quote expr) "$")