comparison lisp/dired.el @ 17944:0714535d0e28

Use defgroup and defcustom.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 May 1997 18:08:23 +0000
parents b3b2e2db1de7
children 2e732d9d5b79
comparison
equal deleted inserted replaced
17943:15dc805eadee 17944:0714535d0e28
33 33
34 ;;; Code: 34 ;;; Code:
35 35
36 ;;; Customizable variables 36 ;;; Customizable variables
37 37
38 (defgroup dired nil
39 "Directory editing."
40 :group 'environment)
41
42 (defgroup dired-mark nil
43 "Handling marks in dired."
44 :prefix "dired-"
45 :group 'dired)
46
47
38 ;;;###autoload 48 ;;;###autoload
39 (defvar dired-listing-switches "-al" 49 (defcustom dired-listing-switches "-al"
40 "*Switches passed to `ls' for dired. MUST contain the `l' option. 50 "*Switches passed to `ls' for dired. MUST contain the `l' option.
41 May contain all other options that don't contradict `-l'; 51 May contain all other options that don't contradict `-l';
42 may contain even `F', `b', `i' and `s'. See also the variable 52 may contain even `F', `b', `i' and `s'. See also the variable
43 `dired-ls-F-marks-symlinks' concerning the `F' switch.") 53 `dired-ls-F-marks-symlinks' concerning the `F' switch."
54 :type 'string
55 :group 'dired)
44 56
45 ; Don't use absolute paths as /bin should be in any PATH and people 57 ; Don't use absolute paths as /bin should be in any PATH and people
46 ; may prefer /usr/local/gnu/bin or whatever. However, chown is 58 ; may prefer /usr/local/gnu/bin or whatever. However, chown is
47 ; usually not in PATH. 59 ; usually not in PATH.
48 60
59 (if (eq system-type 'windows-nt) 71 (if (eq system-type 'windows-nt)
60 "chmode" "chmod") 72 "chmode" "chmod")
61 "Name of chmod command (usually `chmod' or `chmode').") 73 "Name of chmod command (usually `chmod' or `chmode').")
62 74
63 ;;;###autoload 75 ;;;###autoload
64 (defvar dired-ls-F-marks-symlinks nil 76 (defcustom dired-ls-F-marks-symlinks nil
65 "*Informs dired about how `ls -lF' marks symbolic links. 77 "*Informs dired about how `ls -lF' marks symbolic links.
66 Set this to t if `ls' (or whatever program is specified by 78 Set this to t if `ls' (or whatever program is specified by
67 `insert-directory-program') with `-lF' marks the symbolic link 79 `insert-directory-program') with `-lF' marks the symbolic link
68 itself with a trailing @ (usually the case under Ultrix). 80 itself with a trailing @ (usually the case under Ultrix).
69 81
71 nil (the default), if it gives `bar@ -> foo', set it to t. 83 nil (the default), if it gives `bar@ -> foo', set it to t.
72 84
73 Dired checks if there is really a @ appended. Thus, if you have a 85 Dired checks if there is really a @ appended. Thus, if you have a
74 marking `ls' program on one host and a non-marking on another host, and 86 marking `ls' program on one host and a non-marking on another host, and
75 don't care about symbolic links which really end in a @, you can 87 don't care about symbolic links which really end in a @, you can
76 always set this variable to t.") 88 always set this variable to t."
89 :type 'boolean
90 :group 'dired-mark)
77 91
78 ;;;###autoload 92 ;;;###autoload
79 (defvar dired-trivial-filenames "^\\.\\.?$\\|^#" 93 (defcustom dired-trivial-filenames "^\\.\\.?$\\|^#"
80 "*Regexp of files to skip when finding first file of a directory. 94 "*Regexp of files to skip when finding first file of a directory.
81 A value of nil means move to the subdir line. 95 A value of nil means move to the subdir line.
82 A value of t means move to first file.") 96 A value of t means move to first file."
97 :type '(choice (const :tag "Move to subdir" nil)
98 (const :tag "Move to first" t)
99 regexp)
100 :group 'dired)
83 101
84 ;;;###autoload 102 ;;;###autoload
85 (defvar dired-keep-marker-rename t 103 (defcustom dired-keep-marker-rename t
86 ;; Use t as default so that moved files "take their markers with them". 104 ;; Use t as default so that moved files "take their markers with them".
87 "*Controls marking of renamed files. 105 "*Controls marking of renamed files.
88 If t, files keep their previous marks when they are renamed. 106 If t, files keep their previous marks when they are renamed.
89 If a character, renamed files (whether previously marked or not) 107 If a character, renamed files (whether previously marked or not)
90 are afterward marked with that character.") 108 are afterward marked with that character."
109 :type '(choice (const :tag "Keep" t)
110 (character :tag "Mark"))
111 :group 'dired-mark)
91 112
92 ;;;###autoload 113 ;;;###autoload
93 (defvar dired-keep-marker-copy ?C 114 (defcustom dired-keep-marker-copy ?C
94 "*Controls marking of copied files. 115 "*Controls marking of copied files.
95 If t, copied files are marked if and as the corresponding original files were. 116 If t, copied files are marked if and as the corresponding original files were.
96 If a character, copied files are unconditionally marked with that character.") 117 If a character, copied files are unconditionally marked with that character."
118 :type '(choice (const :tag "Keep" t)
119 (character :tag "Mark"))
120 :group 'dired-mark)
97 121
98 ;;;###autoload 122 ;;;###autoload
99 (defvar dired-keep-marker-hardlink ?H 123 (defcustom dired-keep-marker-hardlink ?H
100 "*Controls marking of newly made hard links. 124 "*Controls marking of newly made hard links.
101 If t, they are marked if and as the files linked to were marked. 125 If t, they are marked if and as the files linked to were marked.
102 If a character, new links are unconditionally marked with that character.") 126 If a character, new links are unconditionally marked with that character."
127 :type '(choice (const :tag "Keep" t)
128 (character :tag "Mark"))
129 :group 'dired-mark)
103 130
104 ;;;###autoload 131 ;;;###autoload
105 (defvar dired-keep-marker-symlink ?Y 132 (defcustom dired-keep-marker-symlink ?Y
106 "*Controls marking of newly made symbolic links. 133 "*Controls marking of newly made symbolic links.
107 If t, they are marked if and as the files linked to were marked. 134 If t, they are marked if and as the files linked to were marked.
108 If a character, new links are unconditionally marked with that character.") 135 If a character, new links are unconditionally marked with that character."
136 :type '(choice (const :tag "Keep" t)
137 (character :tag "Mark"))
138 :group 'dired-mark)
109 139
110 ;;;###autoload 140 ;;;###autoload
111 (defvar dired-dwim-target nil 141 (defcustom dired-dwim-target nil
112 "*If non-nil, dired tries to guess a default target directory. 142 "*If non-nil, dired tries to guess a default target directory.
113 This means: if there is a dired buffer displayed in the next window, 143 This means: if there is a dired buffer displayed in the next window,
114 use its current subdir, instead of the current subdir of this dired buffer. 144 use its current subdir, instead of the current subdir of this dired buffer.
115 145
116 The target is used in the prompt for file copy, rename etc.") 146 The target is used in the prompt for file copy, rename etc."
147 :type 'boolean
148 :group 'dired)
117 149
118 ;;;###autoload 150 ;;;###autoload
119 (defvar dired-copy-preserve-time t 151 (defcustom dired-copy-preserve-time t
120 "*If non-nil, Dired preserves the last-modified time in a file copy. 152 "*If non-nil, Dired preserves the last-modified time in a file copy.
121 \(This works on only some systems.)") 153 \(This works on only some systems.)"
154 :type 'boolean
155 :group 'dired)
122 156
123 ;;; Hook variables 157 ;;; Hook variables
124 158
125 (defvar dired-load-hook nil 159 (defvar dired-load-hook nil
126 "Run after loading dired. 160 "Run after loading dired.