emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On removing some obsolete code from subr and core


From: Clément Pit--Claudel
Subject: Re: On removing some obsolete code from subr and core
Date: Sat, 5 Nov 2016 11:52:56 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 2016-11-04 12:59, Mark Oteiza wrote:
> -(define-obsolete-function-alias 'string-to-int 'string-to-number "22.1")

I never understood this one.  The name string-to-int suggests that you'll get 
an error if your string doesn't describe an int.  string-to-number, OTOH, 
suggests that you'll get an int or a float.

How do you get a proper string-to-int behavior in Emacs Lisp? With (let ((v 
(string-to-number s))) (when (floatp v) (error …)))?

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]