* how to restore let binding variables after minibuffer keybord-quit
@ 2006-06-06 10:06 Ye Wenbin
2006-06-06 10:40 ` David Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Ye Wenbin @ 2006-06-06 10:06 UTC (permalink / raw)
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?
Thanks!
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to restore let binding variables after minibuffer keybord-quit
2006-06-06 10:06 how to restore let binding variables after minibuffer keybord-quit Ye Wenbin
@ 2006-06-06 10:40 ` David Hansen
2006-06-06 11:20 ` Ye Wenbin
0 siblings, 1 reply; 3+ messages in thread
From: David Hansen @ 2006-06-06 10:40 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to restore let binding variables after minibuffer keybord-quit
2006-06-06 10:40 ` David Hansen
@ 2006-06-06 11:20 ` Ye Wenbin
0 siblings, 0 replies; 3+ messages in thread
From: Ye Wenbin @ 2006-06-06 11:20 UTC (permalink / raw)
Cc: emacs
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 <david.hansen@gmx.net>
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-06 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-06 10:06 how to restore let binding variables after minibuffer keybord-quit Ye Wenbin
2006-06-06 10:40 ` David Hansen
2006-06-06 11:20 ` Ye Wenbin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.