aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Rost2002-11-07 17:05:01 +0000
committerMarkus Rost2002-11-07 17:05:01 +0000
commit3755bc9cadc8c76ab3eb0e2c7c100d082f24e1ed (patch)
treed4f2389c08eac1b6c1fb35d76c940a00c98bc887
parentb127be31b1d209dc739a0c1c9d4f8d46fbabed77 (diff)
downloademacs-3755bc9cadc8c76ab3eb0e2c7c100d082f24e1ed.tar.gz
emacs-3755bc9cadc8c76ab3eb0e2c7c100d082f24e1ed.zip
(grep-compute-defaults): Undo previous change.
(grep-command, grep-find-command, grep-tree-command): Allow value nil. Do not declare :get property. (grep-use-null-device): Doc fix. Fix type. Do not declare :get property.
-rw-r--r--lisp/progmodes/compile.el42
1 files changed, 14 insertions, 28 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 76f430d6785..965e9ad96f8 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -100,8 +100,7 @@ will be parsed and highlighted as soon as you try to move to them."
100 (error nil)) 100 (error nil))
101 1) 101 1)
102 (format "%s %s -e " grep-program required-options) 102 (format "%s %s -e " grep-program required-options)
103 (format "%s %s " grep-program required-options)))) 103 (format "%s %s " grep-program required-options)))))
104 (put 'grep-command 'standard-value (list (custom-quote grep-command))))
105 (unless grep-find-use-xargs 104 (unless grep-find-use-xargs
106 (setq grep-find-use-xargs 105 (setq grep-find-use-xargs
107 (if (and 106 (if (and
@@ -111,9 +110,7 @@ will be parsed and highlighted as soon as you try to move to them."
111 (equal (call-process "xargs" nil nil nil 110 (equal (call-process "xargs" nil nil nil
112 "-0" "-e" "echo") 111 "-0" "-e" "echo")
113 0)) 112 0))
114 'gnu)) 113 'gnu)))
115 (put 'grep-find-use-xargs 'standard-value
116 (list (custom-quote grep-find-use-xargs))))
117 (unless grep-find-command 114 (unless grep-find-command
118 (setq grep-find-command 115 (setq grep-find-command
119 (cond ((eq grep-find-use-xargs 'gnu) 116 (cond ((eq grep-find-use-xargs 'gnu)
@@ -124,9 +121,7 @@ will be parsed and highlighted as soon as you try to move to them."
124 find-program grep-command)) 121 find-program grep-command))
125 (t (cons (format "%s . -type f -exec %s {} %s \\;" 122 (t (cons (format "%s . -type f -exec %s {} %s \\;"
126 find-program grep-command null-device) 123 find-program grep-command null-device)
127 (+ 22 (length grep-command)))))) 124 (+ 22 (length grep-command)))))))
128 (put 'grep-find-command 'standard-value
129 (list (custom-quote grep-find-command))))
130 (unless grep-tree-command 125 (unless grep-tree-command
131 (setq grep-tree-command 126 (setq grep-tree-command
132 (let* ((glen (length grep-program)) 127 (let* ((glen (length grep-program))
@@ -138,9 +133,7 @@ will be parsed and highlighted as soon as you try to move to them."
138 (format "%s <D> <X> -type f <F> -print | xargs %s <R>" 133 (format "%s <D> <X> -type f <F> -print | xargs %s <R>"
139 find-program gcmd)) 134 find-program gcmd))
140 (t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;" 135 (t (format "%s <D> <X> -type f <F> -exec %s <R> {} %s \\;"
141 find-program gcmd null-device))))) 136 find-program gcmd null-device)))))))
142 (put 'grep-tree-command 'standard-value
143 (list (custom-quote grep-tree-command)))))
144 137
145(defcustom grep-command nil 138(defcustom grep-command nil
146 "The default grep command for \\[grep]. 139 "The default grep command for \\[grep].
@@ -150,14 +143,12 @@ include it when specifying `grep-command'.
150 143
151The default value of this variable is set up by `grep-compute-defaults'; 144The default value of this variable is set up by `grep-compute-defaults';
152call that function before using this variable in your program." 145call that function before using this variable in your program."
153 :type 'string 146 :type '(choice string
154 :get '(lambda (symbol) 147 (const :tag "Not Set" nil))
155 (or grep-command
156 (progn (grep-compute-defaults) grep-command)))
157 :group 'compilation) 148 :group 'compilation)
158 149
159(defcustom grep-use-null-device 'auto-detect 150(defcustom grep-use-null-device 'auto-detect
160 "If non-nil, append the value of `null-device' to grep commands. 151 "If t, append the value of `null-device' to `grep' commands.
161This is done to ensure that the output of grep includes the filename of 152This is done to ensure that the output of grep includes the filename of
162any match in the case where only a single file is searched, and is not 153any match in the case where only a single file is searched, and is not
163necessary if the grep program used supports the `-H' option. 154necessary if the grep program used supports the `-H' option.
@@ -165,20 +156,17 @@ necessary if the grep program used supports the `-H' option.
165The default value of this variable is set up by `grep-compute-defaults'; 156The default value of this variable is set up by `grep-compute-defaults';
166call that function before using this variable in your program." 157call that function before using this variable in your program."
167 :type 'boolean 158 :type 'boolean
168 :get '(lambda (symbol) 159 :type '(choice (const :tag "Do Not Append Null Device" nil)
169 (if (and grep-use-null-device (not (eq grep-use-null-device t))) 160 (const :tag "Append Null Device" t)
170 (progn (grep-compute-defaults) grep-use-null-device) 161 (other :tag "Not Set" auto-detect))
171 grep-use-null-device))
172 :group 'compilation) 162 :group 'compilation)
173 163
174(defcustom grep-find-command nil 164(defcustom grep-find-command nil
175 "The default find command for \\[grep-find]. 165 "The default find command for \\[grep-find].
176The default value of this variable is set up by `grep-compute-defaults'; 166The default value of this variable is set up by `grep-compute-defaults';
177call that function before using this variable in your program." 167call that function before using this variable in your program."
178 :type 'string 168 :type '(choice string
179 :get (lambda (symbol) 169 (const :tag "Not Set" nil))
180 (or grep-find-command
181 (progn (grep-compute-defaults) grep-find-command)))
182 :group 'compilation) 170 :group 'compilation)
183 171
184(defcustom grep-tree-command nil 172(defcustom grep-tree-command nil
@@ -191,11 +179,9 @@ The following place holders should be present in the string:
191 <F> - find options to limit the files matched 179 <F> - find options to limit the files matched
192 <C> - place to put -i if case insensitive grep 180 <C> - place to put -i if case insensitive grep
193 <R> - the regular expression searched for." 181 <R> - the regular expression searched for."
194 :type 'string 182 :type '(choice string
183 (const :tag "Not Set" nil))
195 :version "21.4" 184 :version "21.4"
196 :get (lambda (symbol)
197 (or grep-tree-command
198 (progn (grep-compute-defaults) grep-tree-command)))
199 :group 'compilation) 185 :group 'compilation)
200 186
201(defcustom grep-tree-files-aliases '( 187(defcustom grep-tree-files-aliases '(