emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isearch and Input Methods


From: Stefan Monnier
Subject: Re: isearch and Input Methods
Date: Tue, 06 Mar 2007 15:46:35 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

>> * isearch.el (isearch-message-prefix):
>> Use minibuffer-prompt-properties.
> Thanks.  I have reverted the change.

Right, the problem is that the output of isearch-message-prefix is sometimes
passed to `message' and sometimes to `read-from-minibuffer'.
`read-from-minibuffer' adds minibuffer-prompt-properties for us but fails if
the prompt has the read-only property.

So with the patch, we get "text is read-only" errors, and without the patch
we get some messages without the minibuffer-prompt-properties.

I'm not sure what's the best solution, but in any case I think that
read-from-minibuffer shouldn't fail just because its prompt argument is
read-only.  So I suggest the patch below.


        Stefan


--- minibuf.c   28 fév 2007 11:21:50 -0500      1.326
+++ minibuf.c   06 mar 2007 15:45:45 -0500      
@@ -700,8 +700,6 @@
     specbind (Qinhibit_read_only, Qt);
     specbind (Qinhibit_modification_hooks, Qt);
     Ferase_buffer ();
-    unbind_to (count1, Qnil);
-  }
 
   if (!NILP (current_buffer->enable_multibyte_characters)
       && ! STRING_MULTIBYTE (minibuf_prompt))
@@ -720,6 +718,8 @@
       Fadd_text_properties (make_number (BEG), make_number (PT),
                            Vminibuffer_prompt_properties, Qnil);
     }
+    unbind_to (count1, Qnil);
+  }
 
   minibuf_prompt_width = (int) current_column (); /* iftc */
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]