Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caml-mode: string-to-int is obsolete since emacs 22.1 #5136

Closed
vicuna opened this issue Aug 28, 2010 · 3 comments
Closed

caml-mode: string-to-int is obsolete since emacs 22.1 #5136

vicuna opened this issue Aug 28, 2010 · 3 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 28, 2010

Original bug ID: 5136
Reporter: @Chris00
Status: closed (set by @damiendoligez on 2010-08-30T15:16:03Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.13.0+dev
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @Chris00

Bug description

When compiling caml-types, I have the message

... string-to-int' is an obsolete function (as of Emacs 22.1); use string-to-number' instead.

The attached patch fixes that.

File attachments

@vicuna
Copy link
Author

vicuna commented Aug 30, 2010

Comment author: @damiendoligez

This is more-or-less fixed in 3.12.1+dev. The question is how to remain compatible with older versions of emacs. Currently we define caml-string-to-int to be string-to-number (if available) or string-to-int, but I don't know how to do that without triggering a warning.

@vicuna
Copy link
Author

vicuna commented Aug 30, 2010

Comment author: @Chris00

How about this

(if (fboundp 'string-to-number)
(defalias 'caml-string-to-int 'string-to-number)
(defalias 'caml-string-to-int 'string-to-int))

(I am not an elisp expert either!)

@vicuna
Copy link
Author

vicuna commented Aug 30, 2010

Comment author: @damiendoligez

That seems to do the trick, thanks. I've committed it to 3.12.1+dev.

@vicuna vicuna closed this as completed Aug 30, 2010
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant