diff --git a/emacs/caml-font.el b/emacs/caml-font.el index 0f35655b1..40bee0a3a 100644 --- a/emacs/caml-font.el +++ b/emacs/caml-font.el @@ -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 diff --git a/emacs/caml.el b/emacs/caml.el index ea2e8abc5..76ea852ec 100644 --- a/emacs/caml.el +++ b/emacs/caml.el @@ -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) diff --git a/emacs/camldebug.el b/emacs/camldebug.el index 74f096cfb..6e83baccc 100644 --- a/emacs/camldebug.el +++ b/emacs/camldebug.el @@ -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 diff --git a/emacs/inf-caml.el b/emacs/inf-caml.el index 7f16611aa..8a7757729 100644 --- a/emacs/inf-caml.el +++ b/emacs/inf-caml.el @@ -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) "$")