[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-insert help-buffer
From: |
Chong Yidong |
Subject: |
Re: auto-insert help-buffer |
Date: |
Thu, 08 Mar 2007 11:23:12 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) |
> emacs -q
> M-x auto-insert
> Prompt for keyword
> C-h
>
> opens a help-buffer with descriptions, but without the
> corresponding keywords visible.
>
> This buffer vanishes, when clicked by mouse.
>
> =>
>
> scroll-bar-toolkit-scroll: Wrong type argument
An easier way is to evaluate
(let ((minibuffer-help-form "You are inserting a skeleton."))
(read-string "Foo: " "Bar"))
type C-h, click on the help window, and observe the error.
This seems to be the result of the following code in keyboard.c:3316.
Basically, we record-unwind-protect the current window configuration
before launching the help form, which creates a new window.
Therefore, when the mouse click on the temporary window comes through,
the unbind_to first removes the window, then runs the mouse bindings,
which fail because the window is no longer live.
One possibility is to remove the unwind protect; the other is to check
in the mouse-click functions whether the desired window is live or
not. Which solution is preferable?
/* Process the help character specially if enabled */
if (!NILP (Vhelp_form) && help_char_p (c))
{
Lisp_Object tem0;
count = SPECPDL_INDEX ();
record_unwind_protect (Fset_window_configuration,
Fcurrent_window_configuration (Qnil));
tem0 = Feval (Vhelp_form);
if (STRINGP (tem0))
internal_with_output_to_temp_buffer ("*Help*", print_help, tem0);
cancel_echoing ();
do
c = read_char (0, 0, 0, Qnil, 0, NULL);
while (BUFFERP (c));
/* Remove the help from the frame */
unbind_to (count, Qnil);
- Re: auto-insert help-buffer,
Chong Yidong <=