* bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
@ 2008-11-26 15:37 Juanma Barranquero
2008-11-26 18:08 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer " Drew Adams
2008-12-03 23:58 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer " Glenn Morris
0 siblings, 2 replies; 4+ messages in thread
From: Juanma Barranquero @ 2008-11-26 15:37 UTC (permalink / raw)
To: Bug-Gnu-Emacs
Package: emacs
Severity: minor
Most references to readonly-ness in files.el do talk about
file-visiting buffers, which makes sense. However, `toggle-read-only'
is useful for non-visiting buffers too, though the docstring seems to
imply otherwise.
Docstring for `toggle-read-only' says:
Change whether this buffer is visiting its file read-only.
With prefix argument ARG, make the buffer read-only if ARG is
positive, otherwise make it writable. If visiting file read-only
and `view-read-only' is non-nil, enter view mode.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer is file-visiting
2008-11-26 15:37 bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Juanma Barranquero
@ 2008-11-26 18:08 ` Drew Adams
2008-12-03 23:58 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer " Glenn Morris
1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2008-11-26 18:08 UTC (permalink / raw)
To: 'Juanma Barranquero', 1434, 'Bug-Gnu-Emacs'
> Most references to readonly-ness in files.el do talk about
> file-visiting buffers, which makes sense. However, `toggle-read-only'
> is useful for non-visiting buffers too, though the docstring seems to
> imply otherwise.
>
> Docstring for `toggle-read-only' says:
>
> Change whether this buffer is visiting its file read-only.
> With prefix argument ARG, make the buffer read-only if ARG is
> positive, otherwise make it writable. If visiting file read-only
> and `view-read-only' is non-nil, enter view mode.
FWIW, I agree. When writing mode doc strings that describe some key bindings
using \\[...], for instance, I typically toggle read-only in *Help*, to adjust
line lengths there before correcting the source code.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
2008-11-26 15:37 bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Juanma Barranquero
2008-11-26 18:08 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer " Drew Adams
@ 2008-12-03 23:58 ` Glenn Morris
2008-12-04 0:04 ` Juanma Barranquero
1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2008-12-03 23:58 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: 1434
"Juanma Barranquero" wrote:
> `toggle-read-only' is useful for non-visiting buffers too, though
> the docstring seems to imply otherwise.
So let's change it?
*** files.el 3 Dec 2008 03:26:01 -0000 1.1022
--- files.el 3 Dec 2008 23:57:40 -0000
***************
*** 4404,4412 ****
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg)
! "Change whether this buffer is visiting its file read-only.
With prefix argument ARG, make the buffer read-only if ARG is
! positive, otherwise make it writable. If visiting file read-only
and `view-read-only' is non-nil, enter view mode."
(interactive "P")
(if (and arg
--- 4404,4412 ----
(set-buffer-modified-p arg))
(defun toggle-read-only (&optional arg)
! "Change whether this buffer is read-only.
With prefix argument ARG, make the buffer read-only if ARG is
! positive, otherwise make it writable. If buffer is read-only
and `view-read-only' is non-nil, enter view mode."
(interactive "P")
(if (and arg
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting
2008-12-03 23:58 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer " Glenn Morris
@ 2008-12-04 0:04 ` Juanma Barranquero
0 siblings, 0 replies; 4+ messages in thread
From: Juanma Barranquero @ 2008-12-04 0:04 UTC (permalink / raw)
To: Glenn Morris; +Cc: 1434
On Thu, Dec 4, 2008 at 00:58, Glenn Morris <rgm@gnu.org> wrote:
> So let's change it?
> --- 4404,4412 ----
> (set-buffer-modified-p arg))
>
> (defun toggle-read-only (&optional arg)
> ! "Change whether this buffer is read-only.
> With prefix argument ARG, make the buffer read-only if ARG is
> ! positive, otherwise make it writable. If buffer is read-only
> and `view-read-only' is non-nil, enter view mode."
> (interactive "P")
> (if (and arg
OK.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-04 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 15:37 bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer is file-visiting Juanma Barranquero
2008-11-26 18:08 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply thebuffer " Drew Adams
2008-12-03 23:58 ` bug#1434: Docstring for `toggle-read-only' shouldn't imply the buffer " Glenn Morris
2008-12-04 0:04 ` Juanma Barranquero
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).