;;; comint.el --- general command interpreter in a window stuff
-;; Copyright (C) 1988, 1990, 1992, 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1990, 1992, 1993, 1994 Free Software Foundation, Inc.
;; Author: Olin Shivers <shivers@cs.cmu.edu>
;; Adapted-by: Simon Marshall <s.marshall@dcs.hull.ac.uk>
This is a good thing to set in mode hooks.")
-(defvar comint-input-autoexpand 'history
+(defvar comint-input-autoexpand nil
"*If non-nil, expand input command history references on completion.
This mirrors the optional behavior of tcsh (its autoexpand and histlit).
;;; the appropriate environment.
(defun comint-exec-1 (name buffer command switches)
- (let ((process-environment process-environment))
+ (let ((process-environment (copy-sequence process-environment)))
(setenv "TERMCAP" (format "emacs:co#%d:tc=unknown" (frame-width)))
(setenv "TERM" "emacs")
(setenv "EMACS" "t")
"Display start of this batch of interpreter output at top of window.
Also put cursor there if the current position is not visible."
(interactive)
+ (push-mark)
(let ((pos (point)))
- (goto-char comint-last-input-end)
+ (goto-char (or (marker-position comint-last-input-end) (point-max)))
(beginning-of-line 0)
(set-window-start (selected-window) (point))
- (if (pos-visible-in-window-p pos)
- (goto-char pos)
- (comint-skip-prompt))))
+ (comint-skip-prompt)))
(defun comint-interrupt-subjob ()
"Interrupt the current subjob."