]> code.delx.au - gnu-emacs/blobdiff - lisp/dired.el
Add "^" to the interactive specs of `dired-next/previous-line'
[gnu-emacs] / lisp / dired.el
index 02946e0f3bc03ed2ca1fa403db1d0390afdc563c..049d45d2fa8fb4839e47fd96dd9fa83687ae0c87 100644 (file)
@@ -91,7 +91,7 @@ spaces.  You might want to install ls from GNU Coreutils, which does
 support this option.  Alternatively, you might want to use Emacs's
 own emulation of \"ls\", by using:
   (setq ls-lisp-use-insert-directory-program nil)
-  (require 'ls-lisp)
+  (require \\='ls-lisp)
 This is used by default on MS Windows, which does not have an \"ls\" program.
 Note that `ls-lisp' does not support as many options as GNU ls, though.
 For more details, see Info node `(emacs)ls in Lisp'."
@@ -1466,6 +1466,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
     (define-key map "T" 'dired-do-touch)
     (define-key map "X" 'dired-do-shell-command)
     (define-key map "Z" 'dired-do-compress)
+    (define-key map "c" 'dired-do-compress-to)
     (define-key map "!" 'dired-do-shell-command)
     (define-key map "&" 'dired-do-async-shell-command)
     ;; Comparison commands
@@ -2030,7 +2031,7 @@ Otherwise, toggle `read-only-mode'."
 (defun dired-next-line (arg)
   "Move down lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (let ((line-move-visual)
        (goal-column))
     (line-move arg t))
@@ -2043,7 +2044,7 @@ Optional prefix ARG says how many lines to move; default is one line."
 (defun dired-previous-line (arg)
   "Move up lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (dired-next-line (- (or arg 1))))
 
 (defun dired-next-dirline (arg &optional opoint)
@@ -3494,6 +3495,9 @@ OLD and NEW are both characters used to mark files."
   (interactive)
   (dired-unmark-all-files ?\r))
 
+;; Bound in dired-unmark-all-files
+(defvar dired-unmark-all-files-query)
+
 (defun dired-unmark-all-files (mark &optional arg)
   "Remove a specific mark (or any mark) from every file.
 After this command, type the mark character to remove,
@@ -3504,6 +3508,7 @@ Type \\[help-command] at that time for help."
   (save-excursion
     (let* ((count 0)
           (inhibit-read-only t) case-fold-search
+           dired-unmark-all-files-query
           (string (format "\n%c" mark))
           (help-form "\
 Type SPC or `y' to unmark one file, DEL or `n' to skip to next,
@@ -3515,7 +3520,8 @@ Type SPC or `y' to unmark one file, DEL or `n' to skip to next,
        (if (or (not arg)
                (let ((file (dired-get-filename t t)))
                  (and file
-                      (dired-query 'query "Unmark file `%s'? "
+                      (dired-query 'dired-unmark-all-files-query
+                                   "Unmark file `%s'? "
                                    file))))
            (progn (subst-char-in-region (1- (point)) (point)
                                         (preceding-char) ?\s)
@@ -3558,7 +3564,7 @@ Thus, use \\[backward-page] to find the beginning of a group of errors."
       (let ((inhibit-read-only t))
        (cond ((stringp log)
               (insert (if args
-                          (apply (function format) log args)
+                          (apply #'format-message log args)
                         log)))
              ((bufferp log)
               (insert-buffer-substring log))
@@ -3567,7 +3573,7 @@ Thus, use \\[backward-page] to find the beginning of a group of errors."
               (unless (bolp)
                 (insert "\n"))
               (insert (current-time-string)
-                      "\tBuffer `" (buffer-name obuf) "'\n")
+                      (format-message "\tBuffer `%s'\n" (buffer-name obuf)))
               (goto-char (point-max))
               (insert "\f\n")))))))
 
@@ -3811,7 +3817,8 @@ Ask means pop up a menu for the user to select one of copy, move or link."
            ((memq action '(copy private move link))
             (let ((overwrite (and (file-exists-p to)
                                   (y-or-n-p
-                                   (format "Overwrite existing file `%s'? " to))))
+                                   (format-message
+                                    "Overwrite existing file `%s'? " to))))
                   ;; Binding dired-overwrite-confirmed to nil makes
                   ;; dired-handle-overwrite a no-op.  We instead use
                   ;; y-or-n-p, which pops a graphical menu.
@@ -3824,7 +3831,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
                                (car (find-backup-file-name to)))
                          (or (eq dired-backup-overwrite 'always)
                              (y-or-n-p
-                              (format
+                              (format-message
                                "Make backup for existing file `%s'? " to))))
                 (rename-file to backup-file 0)
                 (dired-relist-entry backup-file))
@@ -3895,7 +3902,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 \f
 ;;; Start of automatically extracted autoloads.
 \f
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "45867cb96abef86d29a9850ee2113cf2")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "29842a53d6651f8f535ec8e02d20d7cc")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
@@ -4087,8 +4094,18 @@ command with a prefix argument (the value does not matter).
 
 \(fn &optional ARG FMT)" t nil)
 
-(autoload 'dired-compress-file "dired-aux" "\
+(autoload 'dired-do-compress-to "dired-aux" "\
+Compress selected files and directories to an archive.
+You are prompted for the archive name.
+The archiving command is chosen based on the archive name extension and
+`dired-compress-files-alist'.
 
+\(fn)" t nil)
+
+(autoload 'dired-compress-file "dired-aux" "\
+Compress or uncompress FILE.
+Return the name of the compressed or uncompressed file.
+Return nil if no change in files.
 
 \(fn FILE)" nil nil)
 
@@ -4398,7 +4415,7 @@ instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired-x" "dired-x.el" "d8d702a50887671b9128ba60bd9ebb8e")
+;;;### (autoloads nil "dired-x" "dired-x.el" "06f532e2e812fa1cb10ade31249e9700")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\