[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
executable.el requires cl?
From: |
Benjamin Rutt |
Subject: |
executable.el requires cl? |
Date: |
Tue, 03 Feb 2004 16:42:47 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) |
The following change to executable.el seems to require cl (for `find-if'):
Index: executable.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/executable.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -c -c -r1.28 -r1.29
*** executable.el 1 Sep 2003 15:45:35 -0000 1.28
--- executable.el 29 Jan 2004 17:53:17 -0000 1.29
***************
*** 141,146 ****
--- 141,171 ----
(defvaralias 'executable-binary-suffixes 'exec-suffixes)
;;;###autoload
+ (defun executable-command-find-posix-p (&optional program)
+ "Check if PROGRAM handles arguments Posix-style.
+ If PROGRAM is non-nil, use that instead of "find"."
+ ;; 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 (or program "find")
+ nil
+ (current-buffer)
+ nil
+ dir
+ "-name"
+ file
+ "-maxdepth"
+ "1")
+ (goto-char (point-min))
+ (if (search-forward file nil t)
+ t))))
+
+ ;;;###autoload
(defun executable-find (command)
"Search for COMMAND in `exec-path' and return the absolute file name.
Return nil if COMMAND is not found anywhere in `exec-path'."
This shows up as an init bug for me, as I have
(require 'filecache)
(file-cache-add-directory-using-find "...")
in my ~/.emacs. Here's how to dupe the bug:
emacs -batch -q --eval "(progn (require 'filecache)
(file-cache-add-directory-using-find \"/tmp\"))"
So, what is the fix, should executable.el do
(eval-when-compile (require 'cl))?
--
Benjamin
- executable.el requires cl?,
Benjamin Rutt <=