Lines Matching defs:shell

47 ;;; Keys common both to Texinfo mode and to TeX shell.
51 ; "Define the keys both in Texinfo mode and in the texinfo-tex-shell."
62 ;; See also texinfo-tex-start-shell.
70 (require 'shell)
72 (defvar texinfo-tex-shell-cd-command "cd"
73 "Command to give to shell running TeX to change directory.")
124 (if (get-buffer "*texinfo-tex-shell*")
125 (quit-process (get-process "texinfo-tex-shell") t)
126 (texinfo-tex-start-shell))
182 (set-process-sentinel (get-process "texinfo-tex-shell")
183 'texinfo-tex-shell-sentinel)
184 (send-string "texinfo-tex-shell"
185 (concat texinfo-tex-shell-cd-command " "
187 (send-string "texinfo-tex-shell"
198 ;; Sometimes you put point into *texinfo-tex-shell*; this prompts
201 (string= (buffer-name (current-buffer)) "*texinfo-tex-shell*")
207 ;; Set to original buffer if in *texinfo-tex-shell*; otherwise,
209 (if (string= (buffer-name (current-buffer)) "*texinfo-tex-shell*")
214 (if (get-buffer "*texinfo-tex-shell*")
215 (quit-process (get-process "texinfo-tex-shell") t)
216 (texinfo-tex-start-shell))
221 (t (set-process-sentinel (get-process "texinfo-tex-shell")
222 'texinfo-tex-shell-sentinel)
223 (send-string "texinfo-tex-shell"
224 (concat texinfo-tex-shell-cd-command
230 (send-string "texinfo-tex-shell"
244 Runs the shell command defined by texinfo-texindex-command."
246 (send-string "texinfo-tex-shell"
253 Runs the shell command defined by texinfo-tex-dvi-print-command."
255 (send-string "texinfo-tex-shell"
264 (defun texinfo-tex-start-shell ()
267 (set-buffer (make-shell "texinfo-tex-shell" "/bin/sh" nil "-v"))
268 (setq texinfo-tex-shell-map (copy-keymap shell-mode-map))
269 (texinfo-define-common-keys texinfo-tex-shell-map)
270 (use-local-map texinfo-tex-shell-map)
271 (run-hooks 'texinfo-tex-shell-hook)
278 (if (not (get-process "texinfo-tex-shell"))
279 (error "No TeX shell running."))
281 (set-buffer (get-buffer "*texinfo-tex-shell*"))
284 (shell-send-input)))
289 (if (get-process "texinfo-tex-shell")
290 ;; Use `texinfo-tex-shell-sentinel' to restart
291 ;; texinfo-tex-shell after it is killed.
292 (kill-process (get-process "texinfo-tex-shell"))))
294 (defun texinfo-tex-shell-sentinel (process event)
295 "Restart texinfo-tex-shell after it is killed."
298 (set-buffer "*texinfo-tex-shell*")
300 (texinfo-tex-start-shell))))
307 (let ((texinfo-tex-shell (get-buffer "*texinfo-tex-shell*"))
309 (if (null texinfo-tex-shell)
311 (pop-to-buffer texinfo-tex-shell)
312 (bury-buffer texinfo-tex-shell)
322 Runs the shell command defined by texinfo-show-tex-queue-command."
324 (if (not (texinfo-tex-shell-running-p))
325 (texinfo-tex-start-shell))
326 (send-string "texinfo-tex-shell"
335 (if (texinfo-tex-shell-running-p)
337 (texinfo-tex-start-shell))
338 (send-string "texinfo-tex-shell"
345 (defun texinfo-tex-shell-running-p ()
346 (and (get-process "texinfo-tex-shell")
347 (eq (process-status (get-process "texinfo-tex-shell")) 'run)))