[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer-local variables affect general-purpose functions
From: |
Eli Zaretskii |
Subject: |
Re: Buffer-local variables affect general-purpose functions |
Date: |
Wed, 26 Mar 2014 22:03:41 +0200 |
> Date: Wed, 26 Mar 2014 12:32:05 -0700
> From: Paul Eggert <address@hidden>
>
> Eli Zaretskii wrote:
> > do we want to do something about that?
>
> Yes, and we should start by removing the backwards-compatibility hacks
> in question. Whether the current buffer is unibyte should not affect
> the behavior of general-purpose functions on characters.
Well, the change in behavior is not limited to unibyte buffers, as I
told in my OP. I think the problem is wider.
> Elisp code that blindly extracts bytes from unibyte buffers or strings,
> and treats these bytes as characters, is broken anyway. It needs to be
> fixed to convert bytes to characters (using 'unibyte-char-to-multibyte',
> say) before it gives them to general-purpose character functions like
> 'downcase' and 'char-equal'.
But there should still be a way to compare bytes and strings of bytes
in a unibyte buffer, right? So perhaps we should have special
functions just for that purpose, and char-equal should signal an error
when presented with unibyte non-ASCII values.
Re: Buffer-local variables affect general-purpose functions, Stefan Monnier, 2014/03/27
- Re: Buffer-local variables affect general-purpose functions, Eli Zaretskii, 2014/03/27
- Re: Buffer-local variables affect general-purpose functions, Stefan Monnier, 2014/03/27
- Re: Buffer-local variables affect general-purpose functions, Eli Zaretskii, 2014/03/28
- Re: Buffer-local variables affect general-purpose functions, Paul Eggert, 2014/03/28
- Re: Unibyte characters, strings and buffers, Eli Zaretskii, 2014/03/28
- Re: Unibyte characters, strings and buffers, Paul Eggert, 2014/03/28