From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26644 invoked from network); 22 Sep 2008 18:17:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Sep 2008 18:17:19 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 62523 invoked from network); 22 Sep 2008 18:17:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Sep 2008 18:17:11 -0000 Received: (qmail 19386 invoked by alias); 22 Sep 2008 18:17:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25722 Received: (qmail 19368 invoked from network); 22 Sep 2008 18:17:05 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Sep 2008 18:17:05 -0000 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4FEE580309A4 for ; Mon, 22 Sep 2008 20:16:58 +0200 (CEST) Received: by ey-out-2122.google.com with SMTP id 25so464530eya.3 for ; Mon, 22 Sep 2008 11:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=72Hb7O9fZ3Wjydmn/8JO8IIvPnO4yPnmLgfplp/z4XU=; b=ZAFZB6g3HfTPHKdsccPgiE/Z7qvnrEJ4/mitNPqjYfBefnYizE8l2HvziZKX3K1bpE ReDNH/Ge/nz88hAgc6drqXUYJYYAhGWRqsUpaJ19I/CO2mtI0Xee5vleoC34tiCaFVA8 rbf0r/STIPJ5WIwJKfxy6hVVMYM+nxHtcVLGs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dBWprQBeVau0MgVXHHrYEX+LKP9D1WpzHsef7uTdCBvPE6R1QLTMznb7Z5vu9YtIuR aOrkc0zuwaxdiNZBmy+puwDxtsp2EJhitIMZ5Z4lvz7bMisoqS5uCKVuWNZeQrCTx16+ DNjIXiFOx0FLClaX5tYgnu6H6EixVYQMKplLI= Received: by 10.210.127.13 with SMTP id z13mr5248727ebc.173.1222107418641; Mon, 22 Sep 2008 11:16:58 -0700 (PDT) Received: by 10.210.19.20 with HTTP; Mon, 22 Sep 2008 11:16:58 -0700 (PDT) Message-ID: <237967ef0809221116y33cba57cj9c3654eb2410cb95@mail.gmail.com> Date: Mon, 22 Sep 2008 20:16:58 +0200 From: "Mikael Magnusson" To: "Peter Stephenson" Subject: Re: PATCH: (large) initial support for combining characters in ZLE. Cc: "Zsh Hackers' List" In-Reply-To: <200804160847.m3G8lsth005941@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080413175442.0e95a241@pws-pc> <237967ef0804140634l7e02ce6fofff7f3f3ec6c8d7c@mail.gmail.com> <20080414145425.566bcb92@news01> <237967ef0804150658h1f8df5e5w422955fc6b92fe29@mail.gmail.com> <20080415174645.0590d589@news01> <237967ef0804151828k4d09afc1p1a86283359d78d97@mail.gmail.com> <200804160847.m3G8lsth005941@news01.csr.com> X-Virus-Scanned: ClamAV 0.92.1/8309/Mon Sep 22 19:31:30 2008 on bifrost X-Virus-Status: Clean 2008/4/16 Peter Stephenson : > "Mikael Magnusson" wrote: >> zsh -f >> setopt interactivecomments >> function toggleopt() { >> #is there some easier way to do this? >> [[ $options[$1] = on ]] && setopt no$1 || setopt $1 >> } >> compdef _options toggleopt=setopt >> function _togglecombining() { >> toggleopt combiningchars >> } >> zle -N _togglecombining >> bindkey ^K _togglecombining >> print -z $'a\u0342' >> > > I haven't looked at the behaviour of user-defined widgets at all, which > will need much more work, but on exit from a widget is a good place to > fix up the cursor position. > > Some more for the FAQ, too. I suddenly realized while doing something completely different that this might still work (where work is defined as not work), and it does. zsh -f print -z $'a\u0342' push-input setopt combiningchars boom -- Mikael Magnusson