mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use defgroup and defcustom.
This commit is contained in:
parent
9a5114ac7e
commit
286c247d12
2 changed files with 122 additions and 49 deletions
101
lisp/dired-x.el
101
lisp/dired-x.el
|
|
@ -7,7 +7,7 @@
|
|||
;; Date: 1994/08/18 19:27:42
|
||||
;; Keywords: dired extensions
|
||||
|
||||
;; Copyright (C) 1993, 1994 Free Software Foundation
|
||||
;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
|
@ -134,46 +134,67 @@
|
|||
|
||||
;;; User-defined variables.
|
||||
|
||||
(defvar dired-bind-vm nil
|
||||
(defgroup dired-x nil
|
||||
"Extended directory editing (dired-x)."
|
||||
:group 'dired)
|
||||
|
||||
(defgroup dired-keys nil
|
||||
"Dired keys customizations."
|
||||
:prefix "dired-"
|
||||
:group 'dired-x)
|
||||
|
||||
(defcustom dired-bind-vm nil
|
||||
"*t says \"V\" in dired-mode will `dired-vm', otherwise \"V\" is `dired-rmail'.
|
||||
Also, RMAIL files contain -*- rmail -*- at the top so \"f\",
|
||||
`dired-advertised-find-file', will run rmail.")
|
||||
`dired-advertised-find-file', will run rmail."
|
||||
:type 'boolean
|
||||
:group 'dired-keys)
|
||||
|
||||
(defvar dired-bind-jump t
|
||||
"*t says bind `dired-jump' to C-x C-j, otherwise do not.")
|
||||
(defcustom dired-bind-jump t
|
||||
"*t says bind `dired-jump' to C-x C-j, otherwise do not."
|
||||
:type 'boolean
|
||||
:group 'dired-keys)
|
||||
|
||||
(defvar dired-bind-man t
|
||||
"*t says bind `dired-man' to \"N\" in dired-mode, otherwise do not.")
|
||||
(defcustom dired-bind-man t
|
||||
"*t says bind `dired-man' to \"N\" in dired-mode, otherwise do not."
|
||||
:type 'boolean
|
||||
:group 'dired-keys)
|
||||
|
||||
(defvar dired-bind-info t
|
||||
"*t says bind `dired-info' to \"I\" in dired-mode, otherwise do not.")
|
||||
(defcustom dired-bind-info t
|
||||
"*t says bind `dired-info' to \"I\" in dired-mode, otherwise do not."
|
||||
:type 'boolean
|
||||
:group 'dired-keys)
|
||||
|
||||
(defvar dired-vm-read-only-folders nil
|
||||
(defcustom dired-vm-read-only-folders nil
|
||||
"*If t, \\[dired-vm] will visit all folders read-only.
|
||||
If neither nil nor t, e.g. the symbol `if-file-read-only', only
|
||||
files not writable by you are visited read-only.
|
||||
|
||||
Read-only folders only work in VM 5, not in VM 4.")
|
||||
Read-only folders only work in VM 5, not in VM 4."
|
||||
:type '(choice (const :tag "off" nil)
|
||||
(const :tag "on" t)
|
||||
(sexp :tag "non-writable only" if-file-read-only))
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-omit-files-p nil
|
||||
(defcustom dired-omit-files-p nil
|
||||
"*If non-nil, \"uninteresting\" files are not listed (buffer-local).
|
||||
Use \\[dired-omit-toggle] to toggle its value.
|
||||
Uninteresting files are those whose filenames match regexp `dired-omit-files',
|
||||
plus those ending with extensions in `dired-omit-extensions'.")
|
||||
plus those ending with extensions in `dired-omit-extensions'."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
(make-variable-buffer-local 'dired-omit-files-p)
|
||||
|
||||
(defvar dired-omit-files "^#\\|^\\.$\\|^\\.\\.$"
|
||||
(defcustom dired-omit-files "^#\\|^\\.$\\|^\\.\\.$"
|
||||
"*Filenames matching this regexp will not be displayed.
|
||||
This only has effect when `dired-omit-files-p' is t. See interactive function
|
||||
`dired-omit-toggle' \(\\[dired-omit-toggle]\) and variable
|
||||
`dired-omit-extensions'. The default is to omit `.', `..', and auto-save
|
||||
files.")
|
||||
files."
|
||||
:type 'regexp
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-omit-size-limit 20000
|
||||
"*If a dired buffer listing contains more than this many characters,
|
||||
do not do omitting. If nil, always do omitting.")
|
||||
|
||||
(defvar dired-find-subdir nil ; t is pretty near to DWIM...
|
||||
(defcustom dired-find-subdir nil ; t is pretty near to DWIM...
|
||||
"*If non-nil, Dired always finds a directory in a buffer of its own.
|
||||
If nil, Dired finds the directory as a subdirectory in some other buffer
|
||||
if it is present as one.
|
||||
|
|
@ -183,30 +204,48 @@ used is chosen.
|
|||
|
||||
Dired avoids switching to the current buffer, so that if you have
|
||||
a normal and a wildcard buffer for the same directory, C-x d RET will
|
||||
toggle between those two.")
|
||||
toggle between those two."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-enable-local-variables t
|
||||
(defcustom dired-omit-size-limit 20000
|
||||
"*Maximum size for the \"omitting\" feature.
|
||||
If nil, there is no maximum size."
|
||||
:type '(choice (const :tag "no maximum" nil) integer)
|
||||
:group 'dired-x)
|
||||
|
||||
(defcustom dired-enable-local-variables t
|
||||
"*Control use of local-variables lists in dired.
|
||||
The value can be t, nil or something else.
|
||||
A value of t means local-variables lists are obeyed;
|
||||
nil means they are ignored; anything else means query.
|
||||
|
||||
This temporarily overrides the value of `enable-local-variables' when listing
|
||||
a directory. See also `dired-local-variables-file'.")
|
||||
a directory. See also `dired-local-variables-file'."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-guess-shell-gnutar nil
|
||||
(defcustom dired-guess-shell-gnutar nil
|
||||
"*If non-nil, name of GNU tar executable (e.g., \"tar\" or \"gtar\") and `z'
|
||||
switch will be used for compressed or gzip'ed tar files. If no GNU tar, set
|
||||
to nil: a pipe using `zcat' or `gunzip -c' will be used.")
|
||||
to nil: a pipe using `zcat' or `gunzip -c' will be used."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-guess-shell-gzip-quiet t
|
||||
"*non-nil says pass -q to gzip overriding verbose GZIP environment.")
|
||||
(defcustom dired-guess-shell-gzip-quiet t
|
||||
"*non-nil says pass -q to gzip overriding verbose GZIP environment."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-guess-shell-znew-switches nil
|
||||
"*If non-nil, then string of switches passed to `znew', example: \"-K\"")
|
||||
(defcustom dired-guess-shell-znew-switches nil
|
||||
"*If non-nil, then string of switches passed to `znew', example: \"-K\""
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
(defvar dired-clean-up-buffers-too t
|
||||
"*t says offer to kill buffers visiting files and dirs deleted in dired.")
|
||||
(defcustom dired-clean-up-buffers-too t
|
||||
"*t says offer to kill buffers visiting files and dirs deleted in dired."
|
||||
:type 'boolean
|
||||
:group 'dired-x)
|
||||
|
||||
;;; KEY BINDINGS.
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,24 @@
|
|||
|
||||
;;; Customizable variables
|
||||
|
||||
(defgroup dired nil
|
||||
"Directory editing."
|
||||
:group 'environment)
|
||||
|
||||
(defgroup dired-mark nil
|
||||
"Handling marks in dired."
|
||||
:prefix "dired-"
|
||||
:group 'dired)
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-listing-switches "-al"
|
||||
(defcustom dired-listing-switches "-al"
|
||||
"*Switches passed to `ls' for dired. MUST contain the `l' option.
|
||||
May contain all other options that don't contradict `-l';
|
||||
may contain even `F', `b', `i' and `s'. See also the variable
|
||||
`dired-ls-F-marks-symlinks' concerning the `F' switch.")
|
||||
`dired-ls-F-marks-symlinks' concerning the `F' switch."
|
||||
:type 'string
|
||||
:group 'dired)
|
||||
|
||||
; Don't use absolute paths as /bin should be in any PATH and people
|
||||
; may prefer /usr/local/gnu/bin or whatever. However, chown is
|
||||
|
|
@ -61,7 +73,7 @@ may contain even `F', `b', `i' and `s'. See also the variable
|
|||
"Name of chmod command (usually `chmod' or `chmode').")
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-ls-F-marks-symlinks nil
|
||||
(defcustom dired-ls-F-marks-symlinks nil
|
||||
"*Informs dired about how `ls -lF' marks symbolic links.
|
||||
Set this to t if `ls' (or whatever program is specified by
|
||||
`insert-directory-program') with `-lF' marks the symbolic link
|
||||
|
|
@ -73,52 +85,74 @@ nil (the default), if it gives `bar@ -> foo', set it to t.
|
|||
Dired checks if there is really a @ appended. Thus, if you have a
|
||||
marking `ls' program on one host and a non-marking on another host, and
|
||||
don't care about symbolic links which really end in a @, you can
|
||||
always set this variable to t.")
|
||||
always set this variable to t."
|
||||
:type 'boolean
|
||||
:group 'dired-mark)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-trivial-filenames "^\\.\\.?$\\|^#"
|
||||
(defcustom dired-trivial-filenames "^\\.\\.?$\\|^#"
|
||||
"*Regexp of files to skip when finding first file of a directory.
|
||||
A value of nil means move to the subdir line.
|
||||
A value of t means move to first file.")
|
||||
A value of t means move to first file."
|
||||
:type '(choice (const :tag "Move to subdir" nil)
|
||||
(const :tag "Move to first" t)
|
||||
regexp)
|
||||
:group 'dired)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-keep-marker-rename t
|
||||
(defcustom dired-keep-marker-rename t
|
||||
;; Use t as default so that moved files "take their markers with them".
|
||||
"*Controls marking of renamed files.
|
||||
If t, files keep their previous marks when they are renamed.
|
||||
If a character, renamed files (whether previously marked or not)
|
||||
are afterward marked with that character.")
|
||||
are afterward marked with that character."
|
||||
:type '(choice (const :tag "Keep" t)
|
||||
(character :tag "Mark"))
|
||||
:group 'dired-mark)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-keep-marker-copy ?C
|
||||
(defcustom dired-keep-marker-copy ?C
|
||||
"*Controls marking of copied files.
|
||||
If t, copied files are marked if and as the corresponding original files were.
|
||||
If a character, copied files are unconditionally marked with that character.")
|
||||
If a character, copied files are unconditionally marked with that character."
|
||||
:type '(choice (const :tag "Keep" t)
|
||||
(character :tag "Mark"))
|
||||
:group 'dired-mark)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-keep-marker-hardlink ?H
|
||||
(defcustom dired-keep-marker-hardlink ?H
|
||||
"*Controls marking of newly made hard links.
|
||||
If t, they are marked if and as the files linked to were marked.
|
||||
If a character, new links are unconditionally marked with that character.")
|
||||
If a character, new links are unconditionally marked with that character."
|
||||
:type '(choice (const :tag "Keep" t)
|
||||
(character :tag "Mark"))
|
||||
:group 'dired-mark)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-keep-marker-symlink ?Y
|
||||
(defcustom dired-keep-marker-symlink ?Y
|
||||
"*Controls marking of newly made symbolic links.
|
||||
If t, they are marked if and as the files linked to were marked.
|
||||
If a character, new links are unconditionally marked with that character.")
|
||||
If a character, new links are unconditionally marked with that character."
|
||||
:type '(choice (const :tag "Keep" t)
|
||||
(character :tag "Mark"))
|
||||
:group 'dired-mark)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-dwim-target nil
|
||||
(defcustom dired-dwim-target nil
|
||||
"*If non-nil, dired tries to guess a default target directory.
|
||||
This means: if there is a dired buffer displayed in the next window,
|
||||
use its current subdir, instead of the current subdir of this dired buffer.
|
||||
|
||||
The target is used in the prompt for file copy, rename etc.")
|
||||
The target is used in the prompt for file copy, rename etc."
|
||||
:type 'boolean
|
||||
:group 'dired)
|
||||
|
||||
;;;###autoload
|
||||
(defvar dired-copy-preserve-time t
|
||||
(defcustom dired-copy-preserve-time t
|
||||
"*If non-nil, Dired preserves the last-modified time in a file copy.
|
||||
\(This works on only some systems.)")
|
||||
\(This works on only some systems.)"
|
||||
:type 'boolean
|
||||
:group 'dired)
|
||||
|
||||
;;; Hook variables
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue