branch: elpa/caml commit f69b62b8f323e64d9704c854fe2492e041262031 Author: Christophe Troestler <christophe.troest...@umons.ac.be> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Fix some warnings and require Emacs ≥ 24.3 --- caml-types.el | 44 ++++++++++++++++++++++---------------------- caml.el | 4 ++-- camldebug.el | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/caml-types.el b/caml-types.el index b2da445..d0eab5a 100644 --- a/caml-types.el +++ b/caml-types.el @@ -277,13 +277,13 @@ See `caml-types-location-re' for annotation file format." ((string-match def-re kind) (let ((var-name (match-string 1 kind)) (l-file (file-name-nondirectory (match-string 2 kind))) - (l-line (caml-string-to-int (match-string 4 kind))) - (l-bol (caml-string-to-int (match-string 5 kind))) - (l-cnum (caml-string-to-int (match-string 6 kind))) + (l-line (string-to-number (match-string 4 kind))) + (l-bol (string-to-number (match-string 5 kind))) + (l-cnum (string-to-number (match-string 6 kind))) (r-file (file-name-nondirectory (match-string 7 kind))) - (r-line (caml-string-to-int (match-string 9 kind))) - (r-bol (caml-string-to-int (match-string 10 kind))) - (r-cnum (caml-string-to-int (match-string 11 kind)))) + (r-line (string-to-number (match-string 9 kind))) + (r-bol (string-to-number (match-string 10 kind))) + (r-cnum (string-to-number (match-string 11 kind)))) (let* ((lpos (vector l-file l-line l-bol l-cnum)) (rpos (vector r-file r-line r-bol r-cnum)) (left (caml-types-get-pos target-buf lpos)) @@ -293,9 +293,9 @@ See `caml-types-location-re' for annotation file format." ((string-match def-end-re kind) (let ((var-name (match-string 1 kind)) (l-file (file-name-nondirectory (match-string 2 kind))) - (l-line (caml-string-to-int (match-string 4 kind))) - (l-bol (caml-string-to-int (match-string 5 kind))) - (l-cnum (caml-string-to-int (match-string 6 kind)))) + (l-line (string-to-number (match-string 4 kind))) + (l-bol (string-to-number (match-string 5 kind))) + (l-cnum (string-to-number (match-string 6 kind)))) (let* ((lpos (vector l-file l-line l-bol l-cnum)) (left (caml-types-get-pos target-buf lpos)) (right (buffer-size target-buf))) @@ -304,13 +304,13 @@ See `caml-types-location-re' for annotation file format." ((string-match internal-re kind) (let ((var-name (match-string 1 kind)) (l-file (file-name-nondirectory (match-string 2 kind))) - (l-line (caml-string-to-int (match-string 4 kind))) - (l-bol (caml-string-to-int (match-string 5 kind))) - (l-cnum (caml-string-to-int (match-string 6 kind))) + (l-line (string-to-number (match-string 4 kind))) + (l-bol (string-to-number (match-string 5 kind))) + (l-cnum (string-to-number (match-string 6 kind))) (r-file (file-name-nondirectory (match-string 7 kind))) - (r-line (caml-string-to-int (match-string 9 kind))) - (r-bol (caml-string-to-int (match-string 10 kind))) - (r-cnum (caml-string-to-int (match-string 11 kind)))) + (r-line (string-to-number (match-string 9 kind))) + (r-bol (string-to-number (match-string 10 kind))) + (r-cnum (string-to-number (match-string 11 kind)))) (let* ((lpos (vector l-file l-line l-bol l-cnum)) (rpos (vector r-file r-line r-bol r-cnum)) (left (caml-types-get-pos target-buf lpos)) @@ -424,13 +424,13 @@ corresponding .annot file." (annotation ())) (while (re-search-forward caml-types-location-re () t) (let ((l-file (file-name-nondirectory (match-string 1))) - (l-line (caml-string-to-int (match-string 3))) - (l-bol (caml-string-to-int (match-string 4))) - (l-cnum (caml-string-to-int (match-string 5))) + (l-line (string-to-number (match-string 3))) + (l-bol (string-to-number (match-string 4))) + (l-cnum (string-to-number (match-string 5))) (r-file (file-name-nondirectory (match-string 6))) - (r-line (caml-string-to-int (match-string 8))) - (r-bol (caml-string-to-int (match-string 9))) - (r-cnum (caml-string-to-int (match-string 10)))) + (r-line (string-to-number (match-string 8))) + (r-bol (string-to-number (match-string 9))) + (r-cnum (string-to-number (match-string 10)))) (unless (caml-types-not-in-file l-file r-file target-file) (setq annotation ()) (while (caml-types--next-annotation) @@ -592,7 +592,7 @@ corresponding .annot file." (with-current-buffer buf (revert-buffer t t))))) ((and (file-readable-p name) (setq buf (find-file-noselect name))) - (with-current-buffer buf (toggle-read-only 1))) + (with-current-buffer buf (read-only-mode 1))) (t (error (format "Can't read the annotation file `%s'" name)))) buf)) diff --git a/caml.el b/caml.el index 388fb59..11f365c 100644 --- a/caml.el +++ b/caml.el @@ -6,8 +6,8 @@ ;; Ian T Zimmerman <i...@rahul.net> ;; Maintainer: Damien Doligez <damien.doli...@inria.fr> ;; Created: July 1993 -;; Package-Requires: ((emacs "22") (cl-lib "0.5")) -;; Version: 4.7.1 +;; Package-Requires: ((emacs "24.3") (cl-lib "0.5")) +;; Version: 4.8 ;; Keywords: OCaml ;; Homepage: https://github.com/ocaml/ocaml/ diff --git a/camldebug.el b/camldebug.el index bd84abc..669754f 100644 --- a/camldebug.el +++ b/camldebug.el @@ -76,7 +76,7 @@ (if (not (face-differs-from-default-p 'camldebug-event)) (invert-face 'camldebug-event)) (if (not (face-differs-from-default-p 'camldebug-underline)) - (set-face-underline-p 'camldebug-underline t)) + (set-face-underline 'camldebug-underline t)) (setq camldebug-overlay-event (make-overlay 1 1)) (overlay-put camldebug-overlay-event 'face 'camldebug-event) (setq camldebug-overlay-under (make-overlay 1 1))