aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-09-24 15:23:13 -0400
committerStefan Monnier2014-09-24 15:23:13 -0400
commit0e176389a723f7eec072af62cde12314de7f70e2 (patch)
treee05fb47591ee7a38362f4a505d1e04789d50b837
parentcd812613c83e2d22a697a9312f9406a99bd8ae7d (diff)
downloademacs-0e176389a723f7eec072af62cde12314de7f70e2.tar.gz
emacs-0e176389a723f7eec072af62cde12314de7f70e2.zip
* lisp/find-cmd.el (find-cmd): Use grep's `find-program'.
Suggested by <lompik@voila.fr>. Fixes: debbugs:18518
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/ChangeLog.142
-rw-r--r--lisp/ChangeLog.162
-rw-r--r--lisp/find-cmd.el26
5 files changed, 28 insertions, 16 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 397b8866f6b..b40fb789532 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -231,6 +231,9 @@ active region handling.
231any reference to a buffer position. The 6th member of the mouse 231any reference to a buffer position. The 6th member of the mouse
232position list returned for such events is now nil. 232position list returned for such events is now nil.
233 233
234** Menu items in keymaps do not support the "key shortcut cache" any more.
235These slots used to hold key-shortcut data, but have been obsolete since
236Emacs-21.
234 237
235 238
236* Lisp Changes in Emacs 24.5 239* Lisp Changes in Emacs 24.5
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 937d0a40b30..3ab2152406c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * find-cmd.el (find-cmd): Use grep's `find-program' (bug#18518).
4 Suggested by <lompik@voila.fr>.
5
12014-09-24 Ulf Jasper <ulf.jasper@web.de> 62014-09-24 Ulf Jasper <ulf.jasper@web.de>
2 7
3 * net/newst-treeview.el (newsticker--treeview-do-get-node-by-id): 8 * net/newst-treeview.el (newsticker--treeview-do-get-node-by-id):
@@ -204,7 +209,7 @@
204 209
205 * window.el (fit-window-to-buffer): Doc fix. 210 * window.el (fit-window-to-buffer): Doc fix.
206 211
2072014-09-15 Ivan Shmakov <ivan@siamics.net> (tiny change) 2122014-09-15 Ivan Shmakov <ivan@siamics.net>
208 213
209 * desktop.el (desktop-create-buffer): Check that buffers are still live 214 * desktop.el (desktop-create-buffer): Check that buffers are still live
210 before burying them (bug#18373). 215 before burying them (bug#18373).
@@ -1585,7 +1590,7 @@
1585 (dbus-register-service): Register it. (Bug#17858) 1590 (dbus-register-service): Register it. (Bug#17858)
1586 (dbus-managed-objects-handler): Fix docstring. 1591 (dbus-managed-objects-handler): Fix docstring.
1587 1592
15882014-07-04 Phil Sainty <psainty@orcon.net.nz> (tiny change) 15932014-07-04 Phil Sainty <psainty@orcon.net.nz>
1589 1594
1590 * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var. 1595 * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var.
1591 (narrow-to-defun): New arg include-comments, defaulting to it 1596 (narrow-to-defun): New arg include-comments, defaulting to it
@@ -8898,7 +8903,7 @@
8898 Add option to delete file when done. (Bug#15647) 8903 Add option to delete file when done. (Bug#15647)
8899 (python-shell-send-string, python-shell-send-region): Use it. 8904 (python-shell-send-string, python-shell-send-region): Use it.
8900 8905
89012013-11-23 Ivan Shmakov <ivan@siamics.net> (tiny change) 89062013-11-23 Ivan Shmakov <ivan@siamics.net>
8902 8907
8903 * vc/diff-mode.el (diff-mode): Only allow diff-default-read-only 8908 * vc/diff-mode.el (diff-mode): Only allow diff-default-read-only
8904 to set buffer-read-only to t, never to nil. (Bug#15938) 8909 to set buffer-read-only to t, never to nil. (Bug#15938)
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index 52612a7a724..3c2a7ff7ee3 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -5178,7 +5178,7 @@
5178 5178
5179 * kmacro.el (kmacro-insert-counter): Doc fix. 5179 * kmacro.el (kmacro-insert-counter): Doc fix.
5180 5180
51812008-11-21 Ivan Shmakov <oneingray@gmail.com> (tiny change) 51812008-11-21 Ivan Shmakov <oneingray@gmail.com>
5182 5182
5183 * progmodes/tcl.el (tcl-filter): Don't forcibly move point. 5183 * progmodes/tcl.el (tcl-filter): Don't forcibly move point.
5184 5184
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index d46337244f6..b4c475aff10 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -7534,7 +7534,7 @@
7534 In doc-strings state whether the argument window has to denote a 7534 In doc-strings state whether the argument window has to denote a
7535 live, valid or any window. 7535 live, valid or any window.
7536 7536
75372012-08-16 Phil Sainty <psainty@orcon.net.nz> (tiny change) 75372012-08-16 Phil Sainty <psainty@orcon.net.nz>
7538 7538
7539 * progmodes/subword.el (subword-forward-function) 7539 * progmodes/subword.el (subword-forward-function)
7540 (subword-backward-function, subword-forward-regexp) 7540 (subword-backward-function, subword-forward-regexp)
diff --git a/lisp/find-cmd.el b/lisp/find-cmd.el
index acd820a31ce..276aeed1208 100644
--- a/lisp/find-cmd.el
+++ b/lisp/find-cmd.el
@@ -39,6 +39,8 @@
39 39
40;;; Code: 40;;; Code:
41 41
42(require 'grep)
43
42(defconst find-constituents 44(defconst find-constituents
43 '((and . find-and) 45 '((and . find-and)
44 (not . find-not) 46 (not . find-not)
@@ -145,13 +147,15 @@ For example:
145 147
146`default-directory' is used as the initial search path. The 148`default-directory' is used as the initial search path. The
147result is a string that should be ready for the command line." 149result is a string that should be ready for the command line."
148 (concat 150 ;; FIXME: Provide a version that returns a list of strings (ready to pass to
149 "find " (shell-quote-argument (expand-file-name default-directory)) " " 151 ;; call-process).
150 (cond 152 (concat find-program " "
151 ((cdr subfinds) 153 (shell-quote-argument (expand-file-name default-directory)) " "
152 (mapconcat 'find-to-string subfinds "")) 154 (cond
153 (t 155 ((cdr subfinds)
154 (find-to-string (car subfinds)))))) 156 (mapconcat #'find-to-string subfinds ""))
157 (t
158 (find-to-string (car subfinds))))))
155 159
156(defun find-and (form) 160(defun find-and (form)
157 "And FORMs together, so: 161 "And FORMs together, so:
@@ -161,7 +165,7 @@ will produce:
161 (if (< (length form) 2) 165 (if (< (length form) 2)
162 (find-to-string (car form)) 166 (find-to-string (car form))
163 (concat "\\( " 167 (concat "\\( "
164 (mapconcat 'find-to-string form "-and ") 168 (mapconcat #'find-to-string form "-and ")
165 "\\) "))) 169 "\\) ")))
166 170
167(defun find-or (form) 171(defun find-or (form)
@@ -172,7 +176,7 @@ will produce:
172 (if (< (length form) 2) 176 (if (< (length form) 2)
173 (find-to-string (car form)) 177 (find-to-string (car form))
174 (concat "\\( " 178 (concat "\\( "
175 (mapconcat 'find-to-string form "-or ") 179 (mapconcat #'find-to-string form "-or ")
176 "\\) "))) 180 "\\) ")))
177 181
178(defun find-not (form) 182(defun find-not (form)
@@ -183,7 +187,7 @@ will produce:
183If you wanted the FORMs -and(ed) together instead then this would 187If you wanted the FORMs -and(ed) together instead then this would
184suffice: 188suffice:
185 \(not \(and \(mtime \"+1\"\) \(name \"something\"\)\)\)" 189 \(not \(and \(mtime \"+1\"\) \(name \"something\"\)\)\)"
186 (concat "-not " (find-or (mapcar 'find-to-string form)))) 190 (concat "-not " (find-or (mapcar #'find-to-string form))))
187 191
188(defun find-prune (form) 192(defun find-prune (form)
189 "-or together FORMs postfix '-prune' and then -or that with a 193 "-or together FORMs postfix '-prune' and then -or that with a
@@ -194,7 +198,7 @@ will produce (unwrapped):
194 -prune -or -true \\\) -and -name '*.pm' \\\)" 198 -prune -or -true \\\) -and -name '*.pm' \\\)"
195 (find-or 199 (find-or
196 (list 200 (list
197 (concat (find-or (mapcar 'find-to-string form)) (find-generic "prune")) 201 (concat (find-or (mapcar #'find-to-string form)) (find-generic "prune"))
198 (find-generic "true")))) 202 (find-generic "true"))))
199 203
200(defun find-generic (option &optional oper argcount args dont-quote) 204(defun find-generic (option &optional oper argcount args dont-quote)