diff options
author | Chong Yidong <cyd@gnu.org> | 2012-09-23 18:21:34 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-09-23 18:21:34 +0800 |
commit | 9a93067632c0fc183ad5fb4ef44edc4ea8373716 (patch) | |
tree | 1b4e2edf6475276dde245345394beb51f2098a07 | |
parent | a0942b9a361abdd267a4c6cf2a0edc2a29741db4 (diff) | |
download | emacs-9a93067632c0fc183ad5fb4ef44edc4ea8373716.tar.gz |
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.
-rw-r--r-- | lisp/ChangeLog | 8 | ||||
-rw-r--r-- | lisp/bindings.el | 2 | ||||
-rw-r--r-- | lisp/bs.el | 2 | ||||
-rw-r--r-- | lisp/buff-menu.el | 2 | ||||
-rw-r--r-- | lisp/dired.el | 2 | ||||
-rw-r--r-- | lisp/ibuffer.el | 2 |
6 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d0c1c50a6dd..40c9f6c2c51 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 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 argument changes. diff --git a/lisp/bindings.el b/lisp/bindings.el index c20a7f30eea..7ca1bf4719f 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -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." diff --git a/lisp/bs.el b/lisp/bs.el index 09aefee416e..a84c951acfe 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -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 () diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 589b6ebc47a..1823b07917d 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -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))) diff --git a/lisp/dired.el b/lisp/dired.el index 6defd6c4877..ed7e6b0ddc8 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -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. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 77461469044..b067c2b639b 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -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'." |