summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-08-16 19:52:48 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-08-17 16:22:29 +0200
commit9dfabe075698760bd74580d97f647cb2a6a32f1b (patch)
tree88486f08b224880f7f272b8bc93438735c9a4d41 /lisp
parenta6412b96e72c32ee981f469a564c8d2155d575aa (diff)
downloademacs-9dfabe075698760bd74580d97f647cb2a6a32f1b.tar.gz
emacs-9dfabe075698760bd74580d97f647cb2a6a32f1b.tar.bz2
emacs-9dfabe075698760bd74580d97f647cb2a6a32f1b.zip
Assume dired-guess is now always available
* lisp/dired-aux.el (dired-read-shell-command): Use dired-guess-shell-command unconditionally, as it is now always available. (dired-do-shell-command): Doc fix; dired-guess is always available. * lisp/dired.el (dired-do-man): Don't require dired-x.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired-aux.el14
-rw-r--r--lisp/dired.el4
2 files changed, 5 insertions, 13 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 426273f65e8..94b2baf72d0 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -780,20 +780,16 @@ which is replaced by the value returned by `dired-mark-prompt',
with ARG and FILES as its arguments. FILES should be a list of
file names. The result is used as the prompt.
-This normally reads using `read-shell-command', but if the
-`dired-x' package is loaded, use `dired-guess-shell-command' to
-offer a smarter default choice of shell command."
+Use `dired-guess-shell-command' to offer a smarter default choice
+of shell command."
(minibuffer-with-setup-hook
(lambda ()
(setq-local dired-aux-files files)
(setq-local minibuffer-default-add-function
#'dired-minibuffer-default-add-shell-commands))
(setq prompt (format prompt (dired-mark-prompt arg files)))
- (if (functionp 'dired-guess-shell-command)
- (dired-mark-pop-up nil 'shell files
- 'dired-guess-shell-command prompt files)
- (dired-mark-pop-up nil 'shell files
- 'read-shell-command prompt nil nil))))
+ (dired-mark-pop-up nil 'shell files
+ 'dired-guess-shell-command prompt files)))
;;;###autoload
(defcustom dired-confirm-shell-command t
@@ -882,7 +878,7 @@ In a noninteractive call (from Lisp code), you must specify
the list of file names explicitly with the FILE-LIST argument, which
can be produced by `dired-get-marked-files', for example.
-If `dired-x' is loaded, `dired-guess-shell-alist-default' and
+`dired-guess-shell-alist-default' and
`dired-guess-shell-alist-user' are consulted when the user is
prompted for the shell command to use interactively.
diff --git a/lisp/dired.el b/lisp/dired.el
index 799a9f4716b..01098fdf891 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -4919,16 +4919,12 @@ Interactively with prefix argument, read FILE-NAME."
;;; Miscellaneous commands
(declare-function Man-getpage-in-background "man" (topic))
-(declare-function dired-guess-shell-command "dired-x" (prompt files))
(defvar manual-program) ; from man.el
(defun dired-do-man ()
"In Dired, run `man' on this file."
(interactive nil dired-mode)
(require 'man)
- ;; FIXME: Move `dired-guess-shell-command' to dired.el to remove the
- ;; need for requiring `dired-x'.
- (require 'dired-x)
(let* ((file (dired-get-file-for-visit))
(manual-program (string-replace "*" "%s"
(dired-guess-shell-command