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: Tue, 11 May 2004 17:00:09 +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>, David Kastrup <address@hidden> writes:
> Can anyone think of any reason why erase-buffer should not remove the
> current buffer completely?  And no, I don't think that read-only
> properties on some entries in a buffer count as a reason:
> erase-buffer is basically a buffer-wide operation and should only be
> influenced by buffer-wide read-only-ness.

> If you want to protect your buffer against erasure, set the whole
> buffer to read-only.  Or signal errors in before-change-functions,
> without actually doing the change.

> That is easy enough to do, and much more reliable.

Can you confirm that all lisp codes do above to protect its
managing buffer instead of just setting some part read-only?

The document of erase-buffer clearly says that it signals an
error on read-only text.

 - Command: erase-buffer
     This function deletes the entire text of the current buffer,
     leaving it empty.  If the buffer is read-only, it signals a
     `buffer-read-only' error; if some of the text in it is read-only,
     it signals a `text-read-only' error.  Otherwise, it deletes the
     text without asking for any confirmation.  It returns `nil'.

That means there may be a code depending on that feature.
We had better leave it unchanged at this moment of before
the release.

---
Ken'ichi HANDA
address@hidden





reply via email to

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