Commit 9a930676 authored by Chong Yidong's avatar Chong Yidong
Browse files

Convert toggle-read-only calls to read-only-mode.

* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* ibuffer.el (ibuffer-do-toggle-read-only): Use read-only-mode.
parent a0942b9a
2012-09-23 Chong Yidong <cyd@gnu.org>
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* ibuffer.el (ibuffer-do-toggle-read-only): Use read-only-mode.
2012-09-23 Chong Yidong <cyd@gnu.org>
 
* image.el (image-type-available-p): Adapt to init-image-library
......
......@@ -40,7 +40,7 @@ corresponding to the mode line clicked."
(interactive "e")
(save-selected-window
(select-window (posn-window (event-start event)))
(call-interactively 'toggle-read-only)))
(read-only-mode 'toggle)))
(defun mode-line-toggle-modified (event)
"Toggle the buffer-modified flag from the mode-line."
......
......@@ -962,7 +962,7 @@ Default is `bs--current-sort-function'."
Uses function `toggle-read-only'."
(interactive)
(with-current-buffer (bs--current-buffer)
(call-interactively 'toggle-read-only))
(read-only-mode 'toggle))
(bs--update-current-line))
(defun bs-clear-modified ()
......
......@@ -520,7 +520,7 @@ This behaves like invoking \\[toggle-read-only] in that buffer."
(interactive)
(let ((read-only
(with-current-buffer (Buffer-menu-buffer t)
(call-interactively 'toggle-read-only)
(read-only-mode 'toggle)
buffer-read-only)))
(tabulated-list-set-col 1 (if read-only "%" " ") t)))
......
......@@ -1964,7 +1964,7 @@ Otherwise, call `toggle-read-only'."
(interactive)
(if (derived-mode-p 'dired-mode)
(wdired-change-to-wdired-mode)
(call-interactively 'toggle-read-only)))
(read-only-mode 'toggle)))
(defun dired-next-line (arg)
"Move down lines then position at filename.
......
......@@ -1283,7 +1283,7 @@ With optional ARG, make read-only only if ARG is not negative."
(:opstring "toggled read only status in"
:interactive "P"
:modifier-p t)
(call-interactively 'toggle-read-only))
(read-only-mode 'toggle))
(define-ibuffer-op ibuffer-do-delete ()
"Kill marked buffers as with `kill-this-buffer'."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment