;;; compiled by jraja@lk-hp-11 on Fri Nov 12 08:41:42 1993 ;;; from file /u/opi/86/jraja/ohtatcp/amitcp/src/appl/EmacsTcp/src/background.el ;;; emacs version 18.58.6. ;;; bytecomp version 2.07; 15-jul-92. ;;; optimization is on; compiled with emacs18 compatibility. (defvar background-show t "\ *If non-nil, background jobs' buffers are shown when they're started.") (defvar background-select nil "\ *If non-nil, background jobs' buffers are selected when they're started.") (byte-code "! # #" [require shell define-key shell-mode-map "" continue-shell-subjob " " kill-shell-subjob] 4) (defun continue-shell-subjob nil "\ Continue this shell's current subjob." (interactive) (byte-code "\"" [continue-process nil t] 3)) (defun background (command) "\ Run COMMAND in the background like csh. A message is displayed when the job starts and finishes. The buffer is in shell mode, so among other things you can control the job and send input to it. The process object is returned if anyone cares. See also shell-mode and the variables background-show and background-select." (interactive "s%% ") (byte-code " ! TP\"5!!O!!!O7C !RM Α !q %) !# ccccc!`\"\" %*" [1 job-number "%1" job-name process-status "%" string-match "^cd[ ]+\\([^ ;]+\\)[ ]*;[ ]*" command file-name-as-directory expand-file-name match-beginning match-end 0 nil default-directory background-select pop-to-buffer background-show get-buffer-create start-process shell-file-name "-c" process message "[%d] %d" process-id erase-buffer "% cd " "\n% " 10 set-marker process-mark set-process-sentinel background-sentinel shell-mode "Background" mode-name] 6)) (defun background-sentinel (process msg) "\ Called when a background job changes state." (byte-code " !O\"ɂ?\"&OP?GU2Ђ?O!OP !8$ !!~ !>p !qmdb O%)xdb!q \"" [message "[%s] %s %s" process-name process 1 nil string= msg "finished\n" "Done" string-match "^exited" "Exit " 28 -1 0 "Continuing" upcase 2 process-command buffer-name process-buffer process-status (signal exit) insert 10 32 current-time-string 11 19 set-buffer-modified-p set-process-buffer] 9))