]> code.delx.au - gnu-emacs/commitdiff
* timer.el (timer-program): New defconst.
authorJim Blandy <jimb@redhat.com>
Thu, 1 Apr 1993 01:07:38 +0000 (01:07 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 1 Apr 1993 01:07:38 +0000 (01:07 +0000)
(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.

lisp/timer.el

index 62d13f11624faed3262b4b71e2907fcaa431fb1a..e63f77defa099a2f6a018c572355a1af3d4e62b9 100644 (file)
 
 ;;; Code:
 
+;;; The name of the program to run as the timer subprocess.  It should
+;;; be in exec-directory.
+(defconst timer-program "timer")
+
 (defvar timer-process nil)
 (defvar timer-alist ())
 (defvar timer-out "")
@@ -63,8 +67,12 @@ Relative times may be specified as a series of numbers followed by units:
   (cond ((or (not timer-process) 
              (memq (process-status timer-process) '(exit signal nil)))
          (if timer-process (delete-process timer-process))
-         (setq timer-process (let ((process-connection-type nil))
-                              (start-process "timer" nil "timer"))
+         (setq timer-process
+              (let ((process-connection-type nil))
+                ;; Don't search the exec path for the timer program;
+                ;; we know exactly which one we want.
+                (start-process (expand-file-name timer-program exec-directory)
+                               nil "timer"))
                timer-alist nil)
          (set-process-filter   timer-process 'timer-process-filter)
          (set-process-sentinel timer-process 'timer-process-sentinel)