summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2001-10-14 20:09:46 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2001-10-14 20:09:46 +0000
commit2d08a2d49a8fb46cadbb278cc12a62ce6adb3a83 (patch)
tree0b8c96b74f6a675dab07785e14305c98b3df5cfa
parentae95a95a9c144a8ceefb9b2c9c09497705209ab1 (diff)
downloademacs-2d08a2d49a8fb46cadbb278cc12a62ce6adb3a83.tar.gz
emacs-2d08a2d49a8fb46cadbb278cc12a62ce6adb3a83.tar.bz2
emacs-2d08a2d49a8fb46cadbb278cc12a62ce6adb3a83.zip
(executable-binary-suffixes): Make varalias.
(executable-find): Use exec-suffixes. (executable-set-magic): Don't use make-local-hook.
-rw-r--r--lisp/progmodes/executable.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index bfe860fb223..b0b798c2970 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -138,21 +138,18 @@ This can be included in `font-lock-keywords' by modes that call `executable'.")
See `compilation-error-regexp-alist'.")
;; The C function openp slightly modified would do the trick fine
-(defvar executable-binary-suffixes
- (if (memq system-type '(ms-dos windows-nt))
- '(".exe" ".com" ".bat" ".cmd" ".btm" "")
- '("")))
+(defvaralias 'executable-binary-suffixes 'exec-suffixes)
;;;###autoload
(defun executable-find (command)
- "Search for COMMAND in exec-path and return the absolute file name.
+ "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 executable-binary-suffixes)
+ (let ((suffixes exec-suffixes)
candidate)
(while suffixes
(setq candidate (concat file (car suffixes)))
@@ -233,7 +230,6 @@ executable."
(let ((point (point-marker))
(buffer-modified-p (buffer-modified-p)))
(goto-char (point-min))
- (make-local-hook 'after-save-hook)
(add-hook 'after-save-hook 'executable-chmod nil t)
(if (looking-at "#![ \t]*\\(.*\\)$")
(and (goto-char (match-beginning 1))