[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: po-mode check read only on edit msgstr
From: |
Kevin Ryde |
Subject: |
Re: po-mode check read only on edit msgstr |
Date: |
Sat, 26 May 2007 11:05:23 +1000 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.99 (gnu/linux) |
Bruno Haible <address@hidden> writes:
>
> Yes. But does this feature actually work? When I load a file with
> find-file-read-only
Oh, I guess po-mode somehow doesn't notice that (probably it should).
I was doing a plain find-file of a read-only file.
> or when I set a buffer read-only by using toggle-read-only,
> in the PO mode
I suspect that doesn't have the desired effect (instead per below).
> I still can press RET, do some modifications, and Ctrl-C Ctrl-C.
At any rate, going from plain find-file of a read-only file I get
Buffer is read-only: #<buffer fr.po>
after C-c C-c. Pretty sure it's when po-read-only is bound in as
buffer-read-only on inserting the new translation. The error is right,
I just hoped it might come sooner.
> This looks low priority to me. But if you can provide an implementation, I
> can put it into the po-mode.
I made this tiny spot for myself, bound to C-x C-q. (The docstring
explanation may be more than is needed.)
(defun my-po-toggle-read-only ()
"Toggle a PO mode buffer between read-only and editable.
\(The usual `toggle-read-only' should not be used in a `po-mode'
buffer. It's kept read-only to prevent edits that would
invalidate the format, and instead there's an underlying
read-only state in the `po-read-only' variable.)"
(interactive)
(setq po-read-only (not po-read-only)))