emacs-devel
[Top][All Lists]
Advanced

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

Re: Character literals for Unicode (control) characters


From: Eli Zaretskii
Subject: Re: Character literals for Unicode (control) characters
Date: Sun, 06 Mar 2016 17:54:18 +0200

> From: Philipp Stephani <address@hidden>
> Date: Sun, 06 Mar 2016 15:24:47 +0000
> 
> I've attached a patch with an initial implementation. 

Thanks.

> +/* Hash table that maps Unicode character names to code points.  */
> +static Lisp_Object character_names;
> +
> +/* Length of the longest Unicode character name, in bytes. */
> +static ptrdiff_t max_character_name_length;
> +
> +/* Initializes `character_names' and `max_character_name_length'.
> +   Called by `read_escape'.  */

I wonder if there's a better way, in particular with a smaller memory
footprint.  Doesn't map-char-table work well enough to avoid
generating all the names up front?

> +        if (! RANGED_INTEGERP (0, code, 0x10FFFF))

This should use MAX_UNICODE_CHAR.



reply via email to

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