diff options
| author | Jim Blandy | 1993-04-01 01:07:38 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-04-01 01:07:38 +0000 |
| commit | 77328ee1d334aa0cf2c3ca9990c6fa568d5d02fa (patch) | |
| tree | b7ee91adb36cb19185193df2e75fadd48be655b4 | |
| parent | 9d0f559a4d165fca10ebb0b202f382c34adb1fb5 (diff) | |
| download | emacs-77328ee1d334aa0cf2c3ca9990c6fa568d5d02fa.tar.gz emacs-77328ee1d334aa0cf2c3ca9990c6fa568d5d02fa.zip | |
* timer.el (timer-program): New defconst.
(run-at-time): Use timer-program as the name of the program the
subprocess should run, and search for it in exec-directory, rather
than checking the entire exec path.
| -rw-r--r-- | lisp/timer.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/timer.el b/lisp/timer.el index 62d13f11624..e63f77defa0 100644 --- a/lisp/timer.el +++ b/lisp/timer.el | |||
| @@ -28,6 +28,10 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | ;;; The name of the program to run as the timer subprocess. It should | ||
| 32 | ;;; be in exec-directory. | ||
| 33 | (defconst timer-program "timer") | ||
| 34 | |||
| 31 | (defvar timer-process nil) | 35 | (defvar timer-process nil) |
| 32 | (defvar timer-alist ()) | 36 | (defvar timer-alist ()) |
| 33 | (defvar timer-out "") | 37 | (defvar timer-out "") |
| @@ -63,8 +67,12 @@ Relative times may be specified as a series of numbers followed by units: | |||
| 63 | (cond ((or (not timer-process) | 67 | (cond ((or (not timer-process) |
| 64 | (memq (process-status timer-process) '(exit signal nil))) | 68 | (memq (process-status timer-process) '(exit signal nil))) |
| 65 | (if timer-process (delete-process timer-process)) | 69 | (if timer-process (delete-process timer-process)) |
| 66 | (setq timer-process (let ((process-connection-type nil)) | 70 | (setq timer-process |
| 67 | (start-process "timer" nil "timer")) | 71 | (let ((process-connection-type nil)) |
| 72 | ;; Don't search the exec path for the timer program; | ||
| 73 | ;; we know exactly which one we want. | ||
| 74 | (start-process (expand-file-name timer-program exec-directory) | ||
| 75 | nil "timer")) | ||
| 68 | timer-alist nil) | 76 | timer-alist nil) |
| 69 | (set-process-filter timer-process 'timer-process-filter) | 77 | (set-process-filter timer-process 'timer-process-filter) |
| 70 | (set-process-sentinel timer-process 'timer-process-sentinel) | 78 | (set-process-sentinel timer-process 'timer-process-sentinel) |