emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Unicode Lisp reader escapes


From: Kim F. Storm
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Thu, 04 May 2006 13:57:22 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Oliver Scholz <address@hidden> writes:

> Here's the patch, only slightly tested:

> +
> +/* Return the internal character coresponding to an UCS code point.*/
> +
> +int
> +ucs_to_internal (ucs)
> +     int ucs;
> +{
> +  if (! EQ (Qnil, SYMBOL_VALUE (intern ("utf-translate-cjk-mode"))))
> +      if (EQ (Qnil, SYMBOL_VALUE (intern ("utf-translate-cjk-lang-env"))))
> +        call0 (intern ("utf-translate-cjk-load-tables"));
> +                           Fget (intern ("utf-subst-table-for-decode"),
> +                                 intern ("translation-hash-table")),
> +      Lisp_Object vect = Fget (intern ("utf-translation-table-for-decode"),
> +                               intern ("translation-table"));
> +}

That's 7 lisp vars accessed from C - for decoding one character!?!

How often does this happen?

If it is only/primarily used for interactive use, I guess it doesn't matter.
Otherwise, I think those vars should be declared in C, to avoid the overhead
of interning them at run-time...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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