Function: idlwave-shell-move-or-history

idlwave-shell-move-or-history is a byte-compiled function defined in idlw-shell.el.gz.

Signature

(idlwave-shell-move-or-history UP &optional ARG)

Documentation

When in last line of process buffer, do comint-previous-input.

Otherwise just move the line. Move down unless UP is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlw-shell.el.gz
(defun idlwave-shell-move-or-history (up &optional arg)
  "When in last line of process buffer, do `comint-previous-input'.
Otherwise just move the line.  Move down unless UP is non-nil."
  (let* ((proc-pos (marker-position
		    (process-mark (get-buffer-process (current-buffer)))))
	 (arg (or arg 1))
	 (arg (if up arg (- arg))))
    (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
    (if (and idlwave-shell-arrows-do-history
             (>= (1+ (line-end-position)) proc-pos))
	(comint-previous-input arg)
      (forward-line (- arg)))))