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
|
|
@ -963,6 +963,18 @@ Byte compile the specified Emacs Lisp files
|
||||||
(@code{dired-do-byte-compile}). @xref{Byte Compilation,, Byte
|
(@code{dired-do-byte-compile}). @xref{Byte Compilation,, Byte
|
||||||
Compilation, elisp, The Emacs Lisp Reference Manual}.
|
Compilation, elisp, The Emacs Lisp Reference Manual}.
|
||||||
|
|
||||||
|
@findex dired-do-info
|
||||||
|
@kindex I @r{(Dired)}
|
||||||
|
@cindex running info on files (in Dired)
|
||||||
|
@item I
|
||||||
|
Run Info on this file (assumed to be a file in Info format).
|
||||||
|
|
||||||
|
@findex dired-do-man
|
||||||
|
@kindex N @r{(Dired)}
|
||||||
|
@cindex running man on files (in Dired)
|
||||||
|
@item N
|
||||||
|
Run man on this file (assumed to be a file in @code{nroff} format).
|
||||||
|
|
||||||
@kindex A @r{(Dired)}
|
@kindex A @r{(Dired)}
|
||||||
@findex dired-do-find-regexp
|
@findex dired-do-find-regexp
|
||||||
@cindex search multiple files (in Dired)
|
@cindex search multiple files (in Dired)
|
||||||
|
|
|
||||||
|
|
@ -921,28 +921,6 @@ to @kbd{V}. Otherwise, @code{dired-bind-rmail} will be bound.
|
||||||
Bound to @kbd{V} if @code{dired-bind-vm} is @code{nil}. Run Rmail on this
|
Bound to @kbd{V} if @code{dired-bind-vm} is @code{nil}. Run Rmail on this
|
||||||
file (assumed to be mail folder in Rmail format).
|
file (assumed to be mail folder in Rmail format).
|
||||||
|
|
||||||
@item dired-info
|
|
||||||
@kindex I
|
|
||||||
@cindex running info.
|
|
||||||
@findex dired-info
|
|
||||||
Bound to @kbd{I}. Run Info on this file (assumed to be a file in Info
|
|
||||||
format).
|
|
||||||
|
|
||||||
@vindex dired-bind-info
|
|
||||||
If the variable @code{dired-bind-info} is @code{nil}, @code{dired-info} will
|
|
||||||
not be bound to @kbd{I}.
|
|
||||||
|
|
||||||
@item dired-man
|
|
||||||
@cindex running man.
|
|
||||||
@kindex N
|
|
||||||
@findex dired-man
|
|
||||||
Bound to @kbd{N}. Run man on this file (assumed to be a file in @code{nroff}
|
|
||||||
format).
|
|
||||||
|
|
||||||
@vindex dired-bind-man
|
|
||||||
If the variable @code{dired-bind-man} is @code{nil}, @code{dired-man} will not
|
|
||||||
be bound to @kbd{N}.
|
|
||||||
|
|
||||||
@item dired-do-relsymlink
|
@item dired-do-relsymlink
|
||||||
@cindex relative symbolic links.
|
@cindex relative symbolic links.
|
||||||
@kindex Y
|
@kindex Y
|
||||||
|
|
|
||||||
19
etc/NEWS
19
etc/NEWS
|
|
@ -1028,6 +1028,25 @@ so automatically.
|
||||||
|
|
||||||
* Changes in Specialized Modes and Packages in Emacs 29.1
|
* Changes in Specialized Modes and Packages in Emacs 29.1
|
||||||
|
|
||||||
|
** Dired
|
||||||
|
|
||||||
|
*** 'dired-info' and 'dired-man' moved from dired-x to dired.
|
||||||
|
The 'dired-info' and 'dired-man' commands have been moved from the
|
||||||
|
'dired-x' package to 'dired'. They have also been renamed to
|
||||||
|
'dired-do-info' and 'dired-do-man'; the old command names are obsolete
|
||||||
|
aliases.
|
||||||
|
|
||||||
|
They keys 'I' ('dired-do-info') and 'N' ('dired-do-man') are now bound
|
||||||
|
in Dired mode by default. The user options 'dired-bind-man' and
|
||||||
|
'dired-bind-info' no longer have any effect and are obsolete.
|
||||||
|
|
||||||
|
To get the old behavior back and unbind these keys in Dired mode, add
|
||||||
|
the following to your Init file:
|
||||||
|
|
||||||
|
(with-eval-after-load 'dired
|
||||||
|
(keymap-set dired-mode-map "N" nil)
|
||||||
|
(keymap-set dired-mode-map "I" nil))
|
||||||
|
|
||||||
** Elisp
|
** Elisp
|
||||||
|
|
||||||
*** New command 'elisp-eval-buffer' (bound to 'C-c C-e').
|
*** New command 'elisp-eval-buffer' (bound to 'C-c C-e').
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
|
;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
|
||||||
|
|
||||||
;; Copyright (C) 1993-1994, 1997, 2001-2022 Free Software Foundation,
|
;; Copyright (C) 1993-2022 Free Software Foundation, Inc.
|
||||||
;; Inc.
|
|
||||||
|
|
||||||
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
|
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
|
||||||
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
|
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
|
||||||
|
|
@ -68,29 +67,11 @@ mbox format, and so cannot be distinguished in this way."
|
||||||
(defvar dired-bind-jump t)
|
(defvar dired-bind-jump t)
|
||||||
(make-obsolete-variable 'dired-bind-jump "not used." "28.1")
|
(make-obsolete-variable 'dired-bind-jump "not used." "28.1")
|
||||||
|
|
||||||
(defcustom dired-bind-man t
|
(defvar dired-bind-man t)
|
||||||
"Non-nil means bind `dired-man' to \"N\" in Dired, otherwise do not.
|
(make-obsolete-variable 'dired-bind-man "not used." "29.1")
|
||||||
Setting this variable directly after dired-x is loaded has no effect -
|
|
||||||
use \\[customize]."
|
|
||||||
:type 'boolean
|
|
||||||
:set (lambda (sym val)
|
|
||||||
(if (set sym val)
|
|
||||||
(define-key dired-mode-map "N" 'dired-man)
|
|
||||||
(if (eq 'dired-man (lookup-key dired-mode-map "N"))
|
|
||||||
(define-key dired-mode-map "N" nil))))
|
|
||||||
:group 'dired-keys)
|
|
||||||
|
|
||||||
(defcustom dired-bind-info t
|
(defvar dired-bind-info t)
|
||||||
"Non-nil means bind `dired-info' to \"I\" in Dired, otherwise do not.
|
(make-obsolete-variable 'dired-bind-info "not used." "29.1")
|
||||||
Setting this variable directly after dired-x is loaded has no effect -
|
|
||||||
use \\[customize]."
|
|
||||||
:type 'boolean
|
|
||||||
:set (lambda (sym val)
|
|
||||||
(if (set sym val)
|
|
||||||
(define-key dired-mode-map "I" 'dired-info)
|
|
||||||
(if (eq 'dired-info (lookup-key dired-mode-map "I"))
|
|
||||||
(define-key dired-mode-map "I" nil))))
|
|
||||||
:group 'dired-keys)
|
|
||||||
|
|
||||||
(defcustom dired-vm-read-only-folders nil
|
(defcustom dired-vm-read-only-folders nil
|
||||||
"If non-nil, \\[dired-vm] will visit all folders read-only.
|
"If non-nil, \\[dired-vm] will visit all folders read-only.
|
||||||
|
|
@ -328,8 +309,6 @@ files"]
|
||||||
"Automatically put on `dired-mode-hook' to get extra Dired features:
|
"Automatically put on `dired-mode-hook' to get extra Dired features:
|
||||||
\\<dired-mode-map>
|
\\<dired-mode-map>
|
||||||
\\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm')
|
\\[dired-do-run-mail]\t-- run mail on folder (see `dired-bind-vm')
|
||||||
\\[dired-info]\t-- run info on file
|
|
||||||
\\[dired-man]\t-- run man on file
|
|
||||||
\\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
|
\\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
|
||||||
\\[dired-omit-mode]\t-- toggle omitting of files
|
\\[dired-omit-mode]\t-- toggle omitting of files
|
||||||
\\[dired-mark-sexp]\t-- mark by Lisp expression
|
\\[dired-mark-sexp]\t-- mark by Lisp expression
|
||||||
|
|
@ -338,10 +317,8 @@ To see the options you can set, use \\[customize-group] RET dired-x RET.
|
||||||
See also the functions:
|
See also the functions:
|
||||||
`dired-flag-extension'
|
`dired-flag-extension'
|
||||||
`dired-virtual'
|
`dired-virtual'
|
||||||
`dired-man'
|
|
||||||
`dired-vm'
|
`dired-vm'
|
||||||
`dired-rmail'
|
`dired-rmail'
|
||||||
`dired-info'
|
|
||||||
`dired-do-find-marked-files'"
|
`dired-do-find-marked-files'"
|
||||||
(interactive)
|
(interactive)
|
||||||
;; These must be done in each new dired buffer.
|
;; These must be done in each new dired buffer.
|
||||||
|
|
@ -1238,31 +1215,6 @@ NOSELECT the files are merely found but not selected."
|
||||||
|
|
||||||
;;; Miscellaneous commands
|
;;; Miscellaneous commands
|
||||||
|
|
||||||
;; Run man on files.
|
|
||||||
|
|
||||||
(declare-function Man-getpage-in-background "man" (topic))
|
|
||||||
|
|
||||||
(defvar manual-program) ; from man.el
|
|
||||||
|
|
||||||
(defun dired-man ()
|
|
||||||
"Run `man' on this file."
|
|
||||||
;; Used also to say: "Display old buffer if buffer name matches filename."
|
|
||||||
;; but I have no idea what that means.
|
|
||||||
(interactive)
|
|
||||||
(require 'man)
|
|
||||||
(let* ((file (dired-get-filename))
|
|
||||||
(manual-program (string-replace "*" "%s"
|
|
||||||
(dired-guess-shell-command
|
|
||||||
"Man command: " (list file)))))
|
|
||||||
(Man-getpage-in-background file)))
|
|
||||||
|
|
||||||
;; Run Info on files.
|
|
||||||
|
|
||||||
(defun dired-info ()
|
|
||||||
"Run `info' on this file."
|
|
||||||
(interactive)
|
|
||||||
(info (dired-get-filename)))
|
|
||||||
|
|
||||||
;; Run mail on mail folders.
|
;; Run mail on mail folders.
|
||||||
|
|
||||||
(declare-function vm-visit-folder "ext:vm" (folder &optional read-only))
|
(declare-function vm-visit-folder "ext:vm" (folder &optional read-only))
|
||||||
|
|
@ -1596,6 +1548,8 @@ If `current-prefix-arg' is non-nil, uses name at point as guess."
|
||||||
;;; Epilog
|
;;; Epilog
|
||||||
|
|
||||||
(define-obsolete-function-alias 'dired-x-submit-report 'report-emacs-bug "24.1")
|
(define-obsolete-function-alias 'dired-x-submit-report 'report-emacs-bug "24.1")
|
||||||
|
(define-obsolete-function-alias 'dired-man #'dired-do-man "29.1")
|
||||||
|
(define-obsolete-function-alias 'dired-info #'dired-do-info "29.1")
|
||||||
|
|
||||||
|
|
||||||
;; As Barry Warsaw would say: "This might be useful..."
|
;; As Barry Warsaw would say: "This might be useful..."
|
||||||
|
|
|
||||||
|
|
@ -2079,8 +2079,10 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
|
||||||
"D" #'dired-do-delete
|
"D" #'dired-do-delete
|
||||||
"G" #'dired-do-chgrp
|
"G" #'dired-do-chgrp
|
||||||
"H" #'dired-do-hardlink
|
"H" #'dired-do-hardlink
|
||||||
|
"I" #'dired-do-info
|
||||||
"L" #'dired-do-load
|
"L" #'dired-do-load
|
||||||
"M" #'dired-do-chmod
|
"M" #'dired-do-chmod
|
||||||
|
"N" #'dired-do-man
|
||||||
"O" #'dired-do-chown
|
"O" #'dired-do-chown
|
||||||
"P" #'dired-do-print
|
"P" #'dired-do-print
|
||||||
"Q" #'dired-do-find-regexp-and-replace
|
"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: "))))
|
(read-file-name "Jump to Dired file: "))))
|
||||||
(dired-jump t file-name))
|
(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)
|
(provide 'dired)
|
||||||
|
|
||||||
(run-hooks 'dired-load-hook) ; for your customizations
|
(run-hooks 'dired-load-hook) ; for your customizations
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue