changeset 92221:dadfc0119018

(ibuffer-do-toggle-read-only): New optional arg as in toggle-read-only.
author Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
date Mon, 25 Feb 2008 20:05:59 +0000
parents 9976b0faa96a
children 77158849803a
files lisp/ibuffer.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuffer.el	Mon Feb 25 20:04:59 2008 +0000
+++ b/lisp/ibuffer.el	Mon Feb 25 20:05:59 2008 +0000
@@ -1257,11 +1257,13 @@
    :modifier-p t)
   (set-buffer-modified-p (not (buffer-modified-p))))
 
-(define-ibuffer-op ibuffer-do-toggle-read-only ()
-  "Toggle read only status in marked buffers."
+(define-ibuffer-op ibuffer-do-toggle-read-only (&optional arg)
+  "Toggle read only status in marked buffers.
+With ARG, set read-only iff arg is positive."
   (:opstring "toggled read only status in"
+   :interactive "P"
    :modifier-p t)
-  (toggle-read-only))
+  (toggle-read-only arg))
 
 (define-ibuffer-op ibuffer-do-delete ()
   "Kill marked buffers as with `kill-this-buffer'."