+2006-07-28 Bill Atkins <atkinw@rpi.edu> (tiny change)
+
+ * wdired.el (wdired-change-to-wdired-mode, wdired-change-to-dired-mode):
+ Throw error if buffer is not in Dired and Wdired mode, respectively.
+
2006-07-28 Chong Yidong <cyd@stupidchicken.com>
* cus-edit.el (custom-no-edit): Revert 2006-07-27 change, so that
See `wdired-mode'."
(interactive)
+ (or (eq major-mode 'dired-mode)
+ (error "Not a Dired buffer"))
(set (make-local-variable 'wdired-old-content)
(buffer-substring (point-min) (point-max)))
(set (make-local-variable 'wdired-old-point) (point))
(defun wdired-change-to-dired-mode ()
"Change the mode back to dired."
+ (or (eq major-mode 'wdired-mode)
+ (error "Not a Wdired buffer"))
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max)
'(read-only nil local-map nil)))