From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ye Wenbin" Newsgroups: gmane.emacs.help Subject: Re: how to restore let binding variables after minibuffer keybord-quit Date: Tue, 06 Jun 2006 19:20:01 +0800 Organization: ywb Message-ID: References: <87odx65zz6.fsf@robotron.kosmorama> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=gbk Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1149592851 3884 80.91.229.2 (6 Jun 2006 11:20:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Jun 2006 11:20:51 +0000 (UTC) Cc: emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 06 13:20:49 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FnZby-00030S-Ng for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jun 2006 13:20:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FnZby-0005qZ-5C for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jun 2006 07:20:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FnZbk-0005pS-84 for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 07:20:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FnZbj-0005p0-Fm for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 07:20:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FnZbj-0005ou-8O for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 07:20:23 -0400 Original-Received: from [202.108.5.84] (helo=m5-84.163.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1FnZj4-00036r-92 for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 07:27:59 -0400 Original-Received: from ye (unknown [218.17.227.217]) by smtp4 (Coremail) with SMTP id wKjRDrDLOgbqZIVEZyeLAA==.32821S2; Tue, 06 Jun 2006 19:20:10 +0800 (CST) Original-To: "David Hansen" In-Reply-To: <87odx65zz6.fsf@robotron.kosmorama> User-Agent: Opera M2/8.54 (Win32, build 7730) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35342 Archived-At: Thanks! Because I use the after-change-functions to convert letters to chinese charaters, so I need to set the after-change-functions. But I found I made a stupid mistake that after-change-functions in minibuffer doesn't equal to the variable of current buffer. That means I needn't change after-change-functions. This will work: (defun eim-insert-ascii () (interactive) (insert (read-from-minibuffer ""))) On Tue, 06 Jun 2006 18:40:29 +0800, David Hansen wrote: > > On Tue, 06 Jun 2006 18:06:17 +0800 Ye Wenbin wrote: > >> Hello, >> I wrote a elisp to input chinese character. I want add a command to >> input >> english letter when the input method activated. The function >> defined as following: >> >> (defun eim-insert-ascii () >> (interactive) >> (let (after-change-functions) >> (insert (read-from-minibuffer "")))) >> >> But when use C-g to quit from minibuffer, the >> after-change-functions doesn't restore >> to the original value. Is there a way to restore let binding >> variables after keybord-quit? > > Use `condition-case' but i would rather temporally disable > the input method than let binding `after-change-function'. > > David > > > > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/