From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: face for non-ASCII characters Date: Sat, 16 Apr 2011 17:50:07 +0200 Message-ID: References: <87k4t4zb5l.fsf@lifelogs.com> <87r5ncxp4z.fsf@lifelogs.com> <87hbo8tf4i.fsf@turtle.gmx.de> <87hbo8xis5.fsf@lifelogs.com> <87aau0t7uy.fsf@turtle.gmx.de> <87sk7svyam.fsf@lifelogs.com> <87vdcngws4.fsf@mail.jurta.org> <87y6hjxgfn.fsf_-_@lifelogs.com> <87hbo6x5pe.fsf@lifelogs.com> <87tydzdtn9.fsf@lifelogs.com> <877hav2f30.fsf@lifelogs.com> <87zknqnsmr.fsf@lifelogs.com> <87bp06nqy4.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1302969042 26242 80.91.229.12 (16 Apr 2011 15:50:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2011 15:50:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 16 17:50:38 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QB7ld-0005ag-N1 for ged-emacs-devel@m.gmane.org; Sat, 16 Apr 2011 17:50:37 +0200 Original-Received: from localhost ([::1]:56574 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7lc-0006sL-9s for ged-emacs-devel@m.gmane.org; Sat, 16 Apr 2011 11:50:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7lY-0006sG-UW for emacs-devel@gnu.org; Sat, 16 Apr 2011 11:50:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QB7lU-0003XA-Pv for emacs-devel@gnu.org; Sat, 16 Apr 2011 11:50:32 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:40890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QB7lU-0003Wy-KU for emacs-devel@gnu.org; Sat, 16 Apr 2011 11:50:28 -0400 Original-Received: by eyd9 with SMTP id 9so1114917eyd.0 for ; Sat, 16 Apr 2011 08:50:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=sTXdR6rxHqaIIOie7hHIBMeSdybyl7ffyoAJ3EVG/sU=; b=r8CPE8eMp4dqLcOfm1eQBRzzLWAGglkXVd/mGmdhKnQbBG5LWJshnHjbpyzxwd1YYD cEc3MdZXwzIwf0i81L0U8TuSnnYuc4FKHE/wG9nBc0JvlpDO5d3QFvU70jXpjwRrPkR4 ecHbgo0Y0TkCwtlgNMDPFxc4xwua4EoM9tXms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=NRsvZe566YAfpJa3woBgqU74NGuD/+FRsbzLFwejsZZne8Dn+asQpx/L0ZEzbD8Ghw VlxmLpZV88FmXb6dL6M/FIQgCskNI3XoHs09lol9VRxZfN/Q0bc6vF8pejq5PFfmgaxp Bap1vMb8RUEcd7YIoj856xjOORUZ9O0WXT7XY= Original-Received: by 10.213.96.71 with SMTP id g7mr3281315ebn.69.1302969027210; Sat, 16 Apr 2011 08:50:27 -0700 (PDT) Original-Received: by 10.213.9.196 with HTTP; Sat, 16 Apr 2011 08:50:07 -0700 (PDT) In-Reply-To: <87bp06nqy4.fsf@lifelogs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.215.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138522 Archived-At: 2011/4/16 Ted Zlatanov : > On Sat, 16 Apr 2011 17:28:48 +0200 Lennart Borgman wrote: > >>> I'd like to keep markchars.el a standalone library, so the attached doe= s >>> not require idn.el. > > LB> Ok. Do I understand it correctly that you use idn.el if it is > LB> available, otherwise not? > > Yes, `idn-is-recommended' is autoloaded. =C2=A0It may be a problem with t= he > fboundp call, which will return true even if the library is not > available: > > (when (autoload 'coocoo "coo") > =C2=A0(fboundp 'coocoo)) > > =3D> t This is not a problem if autoload is setup correctly. > so maybe (require 'idn nil t) is a better approach, and we can define a > stub replacement for `idn-is-recommended'. =C2=A0I didn't dig too much in= to > it because of the possibility of inclusion I mentioned. I think autoloading and checking if the function is defined is the best way. (Autoloading of `idn-is-recommended' should of course not be setup if idn.el is not available.) > Effectively it's the same, yes. Good. >>> `markchars--render-nonidn' is not optimized: it steps through the word >>> in the buffer and assigns the properties to each individual character >>> instead of each range it finds. =C2=A0I don't think that's a big deal b= ut it >>> could be done better. =C2=A0I couldn't reuse your non-IDN detection log= ic >>> because it was not word-oriented. > > LB> Please suggest a better inferface from idn.el if possible to fix > LB> this. > > This is the stepping algorithm at the buffer level, idn.el can't help. ... > The char-table is meant for character lookups, that's why I suggested > it instead of a bool-vector. So using a char-table instead in idn.el would make the interface better? (But we need someone good at this to tell if that is usable here performancewise.) > The function wouldn't need to assign a special property, the character > would already have it. =C2=A0And the highlighting could just look for tha= t > special property instead of hunting for it with a function. I see, thanks. > Ted > > >