[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a read-only buffer writable
From: |
Heime |
Subject: |
Re: Making a read-only buffer writable |
Date: |
Tue, 12 Sep 2023 10:52:51 +0000 |
------- Original Message -------
On Tuesday, September 12th, 2023 at 10:26 PM, Yuri Khan <yuri.v.khan@gmail.com>
wrote:
> On Tue, 12 Sept 2023 at 16:10, Heime heimeborgia@protonmail.com wrote:
>
> > Then I wonder how it is possible for the following function
> > to call
> >
> > (insert-button "[1]"
> >
> > without calling
> >
> > (setq buffer-read-only nil)
> >
> > first, just after
> >
> > (with-help-window (help-buffer)
>
>
> Have you read the source for ‘with-help-window’? It arranges for
> ‘inhibit-read-only’ to be set to ‘t’ around the call to its body. Once
> the body finishes, that temporary binding goes out of scope and
> read-only is in effect again.
I have only read the Emacs Self Documentation with "C-h f". It would be helpful
to include the detail mentioned in the documentation string of the function,
that
'inhibit-read-only' to be set to 't' around the call to its body. Otherwise,
users
cannot be blamed for concluding that 'with-help-window' uses a read-only
buffer,
and thusly have to reset 'inhibit-read-only'.