emacs-devel
[Top][All Lists]
Advanced

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

Re: with-output-to-temp-buffer [Re: reverting CJK input methods]


From: Kenichi Handa
Subject: Re: with-output-to-temp-buffer [Re: reverting CJK input methods]
Date: Mon, 10 May 2004 21:13:00 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> writes:

>     I fully agree with that general principle.  But, for the
>     current case, I'm not sure it is the right thing that
>     erase-buffer signals such an error considering that it
>     removes even the narrowing restriction.

> I think I partly misunderstood the problem.  Is the problem that
> erase-buffer gets an error when there is read-only text in the buffer?

Yes.

> Maybe you're right that it should not get an error for that.

> However, consider the case of a Customize buffer.  That has lots of
> read-only text, the idea being that the user should not be able to
> edit it.  Should erase-buffer in a Customize buffer leave it empty?
> The result would be an undesirable confusion.  We could respond to
> that by saying, "So don't do erase-buffer in a Customize buffer."
> Maybe that's right, but I am not sure.

I think "So don't do ..." is sufficient.

> So it seems to me that there are some cases where we want erase-buffer
> to get rid of read-only text silently, but not all cases.  It seems
> better to change the callers, not change erase-buffer.

>     If we eval this once,

>     (display-message-or-buffer (propertize "abc\n\n" 'read-only t))

> That is clearly a bug, but I think the right fix is to change the
> caller here too.

Ok, I've just installed these changes in addition to fix of
describe-char.

2004-05-10  Kenichi Handa  <address@hidden>

        * print.c (temp_output_buffer_setup): Bind inhibit-read-only and
        inhibit-modification-hooks to t temporarily before calling
        Ferase_buffer.

        * xfns.c (x_create_tip_frame): Bind inhibit-read-only and
        inhibit-modification-hooks to t temporarily before calling
        Ferase_buffer.

        * w32fns.c (x_create_tip_frame): Bind inhibit-read-only and
        inhibit-modification-hooks to t temporarily before calling
        Ferase_buffer.

But I still believe it is better to change erase-buffer
itself (perhaps it should delete all overlays too).  Let's
discuss it after the next release.

---
Ken'ichi HANDA
address@hidden




reply via email to

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