emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp dired-x.el


From: Juri Linkov
Subject: [Emacs-diffs] emacs/lisp dired-x.el
Date: Sun, 22 Feb 2009 23:36:46 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     09/02/22 23:36:46

Modified files:
        lisp           : dired-x.el 

Log message:
        (dired-guess-shell-command): Use read-shell-command
        instead of read-from-minibuffer.
        (dired-read-shell-command): Add code that uses
        minibuffer-with-setup-hook to set minibuffer-default-add-function
        to minibuffer-default-add-dired-shell-commands exactly like
        `dired-read-shell-command' in dired-aux.el already does.  Doc fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/dired-x.el?cvsroot=emacs&r1=1.97&r2=1.98

Patches:
Index: dired-x.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/dired-x.el,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- dired-x.el  22 Feb 2009 21:51:38 -0000      1.97
+++ dired-x.el  22 Feb 2009 23:36:46 -0000      1.98
@@ -1187,7 +1187,7 @@
         default-list val)
     (if (null default)
         ;; Nothing to guess
-        (read-from-minibuffer prompt nil nil nil 'dired-shell-command-history)
+        (read-shell-command prompt nil 'dired-shell-command-history)
       (if (listp default)
           ;; More than one guess
           (setq default-list default
@@ -1200,7 +1200,7 @@
       ;; Put the first guess in the prompt but not in the initial value.
       (setq prompt (concat prompt (format "[%s] " default)))
       ;; All guesses can be retrieved with M-n
-      (setq val (read-from-minibuffer prompt nil nil nil
+      (setq val (read-shell-command prompt nil
                                       'dired-shell-command-history
                                       default-list))
       ;; If we got a return, then return default.
@@ -1209,15 +1209,19 @@
 ;; REDEFINE.
 ;; Redefine dired-aux.el's version:
 (defun dired-read-shell-command (prompt arg files)
-  "Read a dired shell command prompting with PROMPT (using read-string).
+  "Read a dired shell command prompting with PROMPT (using read-shell-command).
 ARG is the prefix arg and may be used to indicate in the prompt which
-  files are affected.
+FILES are affected.
 This is an extra function so that you can redefine it."
+  (minibuffer-with-setup-hook
+      (lambda ()
+        (set (make-local-variable 'minibuffer-default-add-function)
+             'minibuffer-default-add-dired-shell-commands))
   (dired-mark-pop-up
    nil 'shell files
    'dired-guess-shell-command
    (format prompt (dired-mark-prompt arg files)) ; PROMPT
-   files))                                       ; FILES
+     files)))                                      ; FILES
 
 
 ;;; RELATIVE SYMBOLIC LINKS.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]