mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Move dired-info and dired-man from dired-x to dired
* lisp/dired-x.el (dired-bind-man, dired-bind-info): Change into defvars and make obsolete. (dired-extra-startup): Doc fix. (dired-info, dired-man): Move from here... * lisp/dired.el (dired-do-info, dired-do-man): ...to here and rename. (Bug#21981) * lisp/dired.el (dired-mode-map): Bind 'I' and 'N' to 'dired-do-info' and 'dired-do-man'. * doc/misc/dired-x.texi (Miscellaneous Commands): Remove documentation of 'dired-info' and 'dired-man'. * doc/emacs/dired.texi (Dired Enter): Document 'dired-do-info' and 'dired-do-man'. * etc/NEWS: Announce the above changes.
This commit is contained in:
parent
25d80e4f81
commit
0bb6b2dd1e
5 changed files with 65 additions and 75 deletions
|
|
@ -2079,8 +2079,10 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
|
|||
"D" #'dired-do-delete
|
||||
"G" #'dired-do-chgrp
|
||||
"H" #'dired-do-hardlink
|
||||
"I" #'dired-do-info
|
||||
"L" #'dired-do-load
|
||||
"M" #'dired-do-chmod
|
||||
"N" #'dired-do-man
|
||||
"O" #'dired-do-chown
|
||||
"P" #'dired-do-print
|
||||
"Q" #'dired-do-find-regexp-and-replace
|
||||
|
|
@ -4795,6 +4797,31 @@ Interactively with prefix argument, read FILE-NAME."
|
|||
(read-file-name "Jump to Dired file: "))))
|
||||
(dired-jump t 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 ()
|
||||
"Run `man' on this file."
|
||||
(interactive)
|
||||
(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))
|
||||
(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)))
|
||||
|
||||
(provide 'dired)
|
||||
|
||||
(run-hooks 'dired-load-hook) ; for your customizations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue