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

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

Re: Can't isearch for non-ASCII text


From: Katsumi Yamaoka
Subject: Re: Can't isearch for non-ASCII text
Date: Wed, 07 Mar 2007 10:01:48 +0900
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

>>>>> In <address@hidden> Stefan Monnier wrote:

>> Debugger entered--Lisp error: (text-read-only)
>>   read-from-minibuffer(#("Search: " 0 8 (read-only t face 
>> minibuffer-prompt))...
>>   byte-code(...
>>   isearch-edit-string()
>>   isearch-exit()
>>   call-interactively(isearch-exit)

> This seems to indicate a bug elsewhere.
> This backtrace is not enough to pin it down.  Maybe a C backtrace would be
> more enlightening.

I'm not skillful with C debugging and don't know how to break
the program by such an error, sorry.  But the cause of the problem
is obvious now; that is, Fread_minibuf tries to put some text
properties to the prompt string even if it has the read-only
property.  Although I'm not quite sure this should really be
fixed, the attached patch makes the following program work with
no error.

(read-from-minibuffer (propertize "Prompt: " 'read-only t))

--8<---------------cut here---------------start------------->8---
*** minibuf.c~  Wed Feb 21 21:58:15 2007
--- minibuf.c   Wed Mar  7 00:58:56 2007
***************
*** 711,716 ****
--- 711,718 ----
    Finsert (1, &minibuf_prompt);
    if (PT > BEG)
      {
+       int count1 = SPECPDL_INDEX ();
+       specbind (Qinhibit_read_only, Qt);
        Fput_text_property (make_number (BEG), make_number (PT),
                          Qfront_sticky, Qt, Qnil);
        Fput_text_property (make_number (BEG), make_number (PT),
***************
*** 719,724 ****
--- 721,727 ----
                          Qfield, Qt, Qnil);
        Fadd_text_properties (make_number (BEG), make_number (PT),
                            Vminibuffer_prompt_properties, Qnil);
+       unbind_to (count1, Qnil);
      }
  
    minibuf_prompt_width = (int) current_column (); /* iftc */
--8<---------------cut here---------------end--------------->8---

Regards,




reply via email to

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