Replace version 24.2 with 24.3 where appropriate (hopefully)
[bpt/emacs.git] / lisp / wdired.el
index cc99bd4..b893e8f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; wdired.el --- Rename files editing their names in dired buffers
 
-;; Copyright (C) 2004-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2004-2012  Free Software Foundation, Inc.
 
 ;; Filename: wdired.el
 ;; Author: Juan León Lahoz García <juanleon1@gmail.com>
@@ -32,7 +32,7 @@
 ;; the files in a "dired" buffer? Now you can do this.  All the power
 ;; of Emacs commands are available to renaming files!
 ;;
-;; This package provides a function that makes the filenames of a a
+;; This package provides a function that makes the filenames of a
 ;; dired buffer editable, by changing the buffer mode (which inhibits
 ;; all of the commands of dired mode). Here you can edit the names of
 ;; one or more files and directories, and when you press C-c C-c, the
@@ -75,7 +75,6 @@
 
 (defvar dired-backup-overwrite) ; Only in Emacs 20.x this is a custom var
 
-(eval-when-compile (require 'cl))
 (require 'dired)
 (autoload 'dired-do-create-files-regexp "dired-aux")
 
@@ -184,14 +183,21 @@ program `dired-chmod-program', which must exist."
 
 
 (defun wdired-mode ()
-  "\\<wdired-mode-map>File Names Editing mode.
+  "Writable Dired (WDired) mode.
+\\<wdired-mode-map>
+In WDired mode, you can edit the names of the files in the
+buffer, the target of the links, and the permission bits of the
+files.
+
+Type \\[wdired-finish-edit] to exit WDired mode, returning to
+Dired mode, and make your edits \"take effect\" by modifying the
+file and directory names, link targets, and/or file permissions
+on disk.  If you delete the filename of a file, it is flagged for
+deletion in the Dired buffer.
 
-Press \\[wdired-finish-edit] to make the changes to take effect
-and exit.  To abort the edit, use \\[wdired-abort-changes].
+Type \\[wdired-abort-changes] to abort your edits and exit WDired mode.
 
-In this mode you can edit the names of the files, the target of
-the links and the permission bits of the files.  You can use
-\\[customize-group] RET wdired to customize WDired behavior.
+Type \\[customize-group] RET wdired to customize WDired behavior.
 
 The only editable texts in a WDired buffer are filenames,
 symbolic link targets, and filenames permission."
@@ -202,16 +208,17 @@ symbolic link targets, and filenames permission."
 
 ;;;###autoload
 (defun wdired-change-to-wdired-mode ()
-  "Put a dired buffer in a mode in which filenames are editable.
+  "Put a Dired buffer in Writable Dired (WDired) mode.
 \\<wdired-mode-map>
-This mode allows the user to change the names of the files, and after
-typing \\[wdired-finish-edit] Emacs renames the files and directories
-in disk.
+In WDired mode, you can edit the names of the files in the
+buffer, the target of the links, and the permission bits of the
+files.  After typing \\[wdired-finish-edit], Emacs modifies the files and
+directories to reflect your edits.
 
 See `wdired-mode'."
   (interactive)
-  (or (eq major-mode 'dired-mode)
-      (error "Not a Dired buffer"))
+  (unless (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))