Improve dired-do-{info,man} error handling
* lisp/dired.el (dired-do-man, dired-do-info): Use 'dired-get-file-for-visit' to get better error handling. Interactive mode tagging.
This commit is contained in:
parent
45badeceec
commit
60f77c58f1
1 changed files with 6 additions and 6 deletions
|
@ -4810,22 +4810,22 @@ Interactively with prefix argument, read FILE-NAME."
|
|||
(defvar manual-program) ; from man.el
|
||||
|
||||
(defun dired-do-man ()
|
||||
"Run `man' on this file."
|
||||
(interactive)
|
||||
"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-filename))
|
||||
(let* ((file (dired-get-file-for-visit))
|
||||
(manual-program (string-replace "*" "%s"
|
||||
(dired-guess-shell-command
|
||||
"Man command: " (list file)))))
|
||||
(Man-getpage-in-background file)))
|
||||
|
||||
(defun dired-do-info ()
|
||||
"Run `info' on this file."
|
||||
(interactive)
|
||||
(info (dired-get-filename)))
|
||||
"In Dired, run `info' on this file."
|
||||
(interactive nil dired-mode)
|
||||
(info (dired-get-file-for-visit)))
|
||||
|
||||
(provide 'dired)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue