[Top][All Lists]

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

Re: evaluating numbers

From: Jean-Christophe Helary
Subject: Re: evaluating numbers
Date: Sun, 10 Nov 2019 09:22:19 +0900

> On Nov 10, 2019, at 1:03, Stefan Monnier <address@hidden> wrote:
>>> Characters are just integers in Emacs.
>> I know that. You're not really answering the above question. When people
>> expect a character to be returned, they expect a character and not
>> a code point.
> Emacs can't know what the user expects.

Developers can know.

>> How useful is:
>> (decode-char 'emacs 345)
>> 345 (#o531, #x159)
> And the code that displays "345 (#o531, #x159)" doesn't know that this
> 345 is coming out of a function which is expected to return characters.

Considering the documentation of decode-char ("returns a character"), that's 
either an implementation error or a documentation error...

And if the intent is "returns an integer that is the code point of the 
character that sometimes gets to be displayed and sometimes not... etc." then 
let it be documented that way. But you can't say "it's a character, except when 
it's not, and Emacs wouldn't know the difference anyway, so oops".


Jean-Christophe Helary
http://mac4translators.blogspot.com @brandelune

reply via email to

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