bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20704: info.el bug fix; Interprets Info format wrongly


From: Stefan Monnier
Subject: bug#20704: info.el bug fix; Interprets Info format wrongly
Date: Mon, 01 Jun 2015 10:01:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Thanks,

> +           (+ (point-min) (byte-to-position
> +                              (read (current-buffer))))

Hmm... this only works if the Info file is encoded in UTF-8.
I guess in the case of Info, 99% of the files are just ASCII and there's
a chance that the vast majority of the rest is (or will be) UTF-8,
so maybe this hack works well in practice.

But I think we should define an `Info-bytepos-to-charpos' function for that.
It can be defined as an alias for byte-to-position, but at least it
concentrates this utf-8 assumption at a single place where we can place
a clear comment.


        Stefan





reply via email to

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