(executable-find): Move to files.el.
This commit is contained in:
parent
a447965796
commit
ba47dcb288
2 changed files with 5 additions and 26 deletions
|
@ -1,5 +1,8 @@
|
|||
2005-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* files.el (executable-find): Move from executable.el. Use locate-file.
|
||||
* progmodes/executable.el (executable-find): Move to files.el.
|
||||
|
||||
* font-lock.el (font-lock-fontify-keywords-region): Use a marker
|
||||
when trying to ensure forward progress.
|
||||
|
||||
|
@ -19,7 +22,7 @@
|
|||
* progmodes/sh-script.el (sh-indent-for-do): Default to 0.
|
||||
|
||||
* progmodes/ada-mode.el (ada-adjust-case-skeleton):
|
||||
Moved from ada-stmt.el.
|
||||
Move from ada-stmt.el.
|
||||
(ada-mode): Add ada-adjust-case-skeleton to skeleton-end-hook.
|
||||
|
||||
* progmodes/ada-stmt.el (ada-adjust-case-skeleton):
|
||||
|
|
|
@ -161,30 +161,6 @@ If PROGRAM is non-nil, use that instead of \"find\"."
|
|||
(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'."
|
||||
(let ((list exec-path)
|
||||
file)
|
||||
(while list
|
||||
(setq list
|
||||
(if (and (setq file (expand-file-name command (car list)))
|
||||
(let ((suffixes exec-suffixes)
|
||||
candidate)
|
||||
(while suffixes
|
||||
(setq candidate (concat file (car suffixes)))
|
||||
(if (and (file-executable-p candidate)
|
||||
(not (file-directory-p candidate)))
|
||||
(setq suffixes nil)
|
||||
(setq suffixes (cdr suffixes))
|
||||
(setq candidate nil)))
|
||||
(setq file candidate)))
|
||||
nil
|
||||
(setq file nil)
|
||||
(cdr list))))
|
||||
file))
|
||||
|
||||
(defun executable-chmod ()
|
||||
"This gets called after saving a file to assure that it be executable.
|
||||
You can set the absolute or relative mode in variable `executable-chmod' for
|
||||
|
@ -301,5 +277,5 @@ file modes."
|
|||
|
||||
(provide 'executable)
|
||||
|
||||
;;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d
|
||||
;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d
|
||||
;;; executable.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue