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

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

bug#24603: [RFC 08/18] Support casing characters which map into multiple


From: Eli Zaretskii
Subject: bug#24603: [RFC 08/18] Support casing characters which map into multiple code points
Date: Tue, 04 Oct 2016 10:38:20 +0300

> From: Michal Nazarewicz <mina86@mina86.com>
> Date: Tue,  4 Oct 2016 03:10:31 +0200
> 
> * src/make-special-casing.py: New script to generate special-casing.h
> file from the SpecialCasing.txt data file.

Please do this without Python, either in Emacs Lisp and/or the tools
already used in admin/unidata, including awk.  Python is still not
available as widely as the other tools.

> +special-casing.h: make-special-casing.py ../admin/unidata/SpecialCasing.txt
> +     $(AM_V_GEN)
> +     python $^ $@

Don't use a literal name of a program, so users could specify their
name and/or absolute file name at build time.  See what we do with
awk, for example.

> +#include "special-casing.h"

Why not a shorter 'casing.h'?

Once again, this stores the casing rules in C, whereas I'd prefer to
have them in tables accessible from Lisp.

> @@ -194,7 +276,9 @@ casify_object (enum case_action flag, Lisp_Object obj)
>  DEFUN ("upcase", Fupcase, Supcase, 1, 1, 0,
>         doc: /* Convert argument to upper case and return that.
>  The argument may be a character or string.  The result has the same type.
> -The argument object is not altered--the value is a copy.
> +The argument object is not altered--the value is a copy.  If argument
> +is a character, characters which map to multiple code points when
> +cased, e.g. fi, are returned unchanged.
>  See also `capitalize', `downcase' and `upcase-initials'.  */)

I think this doc string should say what to do if the application wants
to convert fi into "FI".

Thanks.





reply via email to

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