* [patch] 21.3 filecache.el - Use executable.el executable-command-find-unix-p
@ 2004-01-27 13:10 Jari Aalto+mail.linux
0 siblings, 0 replies; only message in thread
From: Jari Aalto+mail.linux @ 2004-01-27 13:10 UTC (permalink / raw)
This patch supposes, that executable.el has been patched for new
function.
2004-01-27 Jari Aalto <jaalto@w2kpicasso>
* filecache.el
(top level): Added autoload for `executable-command-find-unix-p'
(file-cache-find-unix-p): Removed.
Moved to executable.el
(file-cache-add-directory-using-find): Use
`executable-command-find-unix-p'
Index: filecache.el
===================================================================
RCS file: /cygdrive/h/data/version-control/cvsroot/emacs/gnu-emacs/lisp213/filecache.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -IId: -b -w -u -r1.7 -r1.8
--- filecache.el 26 Jan 2004 19:16:23 -0000 1.7
+++ filecache.el 27 Jan 2004 13:07:32 -0000 1.8
@@ -139,6 +139,8 @@
;;; Code:
+(autoload 'executable-command-find-unix-p "executable")
+
(defgroup file-cache nil
"Find files using a pre-loaded cache."
:group 'files
@@ -327,36 +329,14 @@
file-cache-alist)))
)))
-(defun file-cache-find-unix-p ()
- "Check if `file-cache-find-command' is Unix type program."
- ;; Pick file to search from location we know
- (let* ((dir (car load-path))
- (file (find-if
- (lambda (x)
- ;; Filter directories . and ..
- (not (string-match "^\\.\\.?$" x)))
- (directory-files dir))))
- (with-temp-buffer
- (call-process file-cache-find-command
- nil
- (current-buffer)
- nil
- dir
- "-name"
- file
- "-maxdepth"
- "1")
- (goto-char (point-min))
- (if (search-forward file nil t)
- t))))
-
(defun file-cache-add-directory-using-find (directory)
"Use the `find' command to add files to the file cache.
Find is run in DIRECTORY."
(interactive "DAdd files under directory: ")
(let ((dir (expand-file-name directory)))
(if (eq file-cache-find-command-unix-flag 'not-defined)
- (setq file-cache-find-command-unix-flag (file-cache-find-unix-p)))
+ (setq file-cache-find-command-unix-flag
+ (executable-command-find-unix-p file-cache-find-command)))
(set-buffer (get-buffer-create file-cache-buffer))
(erase-buffer)
(call-process file-cache-find-command nil
--
http://tiny-tools.sourceforge.net/
Swatch @time http://www.mir.com.my/iTime/itime.htm
http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses! http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences http://www.opensource.org/licenses/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-27 13:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 13:10 [patch] 21.3 filecache.el - Use executable.el executable-command-find-unix-p Jari Aalto+mail.linux
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.