comparison lisp/term.el @ 15246:ba353653c03a

(term-send-raw-string): send-string -> process-send-string. (term-arguments): Remove unused local `values'. (term-handle-deferred-scroll): Fix off-by-one bug.
author Karl Heuer <kwzh@gnu.org>
date Fri, 17 May 1996 21:16:00 +0000
parents 3b8ece0572d5
children 877d4b6fd768
comparison
equal deleted inserted replaced
15245:4bfe3c580496 15246:ba353653c03a
640 ;; Note that (term-current-row) must be called *after* 640 ;; Note that (term-current-row) must be called *after*
641 ;; (point) has been updated to (process-mark proc). 641 ;; (point) has been updated to (process-mark proc).
642 (goto-char (process-mark proc)) 642 (goto-char (process-mark proc))
643 (if (term-pager-enabled) 643 (if (term-pager-enabled)
644 (setq term-pager-count (term-current-row))) 644 (setq term-pager-count (term-current-row)))
645 (send-string proc chars)))) 645 (process-send-string proc chars))))
646 646
647 (defun term-send-raw () 647 (defun term-send-raw ()
648 "Send the last character typed through the terminal-emulator 648 "Send the last character typed through the terminal-emulator
649 without any interpretation." 649 without any interpretation."
650 (interactive) 650 (interactive)
1374 in `term-delimiter-argument-list' is a separate argument. 1374 in `term-delimiter-argument-list' is a separate argument.
1375 Argument 0 is the command name." 1375 Argument 0 is the command name."
1376 (let ((argpart "[^ \n\t\"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)") 1376 (let ((argpart "[^ \n\t\"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)")
1377 (args ()) (pos 0) 1377 (args ()) (pos 0)
1378 (count 0) 1378 (count 0)
1379 beg str value quotes) 1379 beg str quotes)
1380 ;; Build a list of all the args until we have as many as we want. 1380 ;; Build a list of all the args until we have as many as we want.
1381 (while (and (or (null mth) (<= count mth)) 1381 (while (and (or (null mth) (<= count mth))
1382 (string-match argpart string pos)) 1382 (string-match argpart string pos))
1383 (if (and beg (= pos (match-beginning 0))) 1383 (if (and beg (= pos (match-beginning 0)))
1384 ;; It's contiguous, part of the same arg. 1384 ;; It's contiguous, part of the same arg.
2329 (set-buffer previous-buffer) 2329 (set-buffer previous-buffer)
2330 (select-window selected)))) 2330 (select-window selected))))
2331 2331
2332 (defun term-handle-deferred-scroll () 2332 (defun term-handle-deferred-scroll ()
2333 (let ((count (- (term-current-row) term-height))) 2333 (let ((count (- (term-current-row) term-height)))
2334 (if (> count 0) 2334 (if (>= count 0)
2335 (save-excursion 2335 (save-excursion
2336 (goto-char term-home-marker) 2336 (goto-char term-home-marker)
2337 (term-vertical-motion count) 2337 (term-vertical-motion (1+ count))
2338 (set-marker term-home-marker (point)) 2338 (set-marker term-home-marker (point))
2339 (setq term-current-row (1- term-height)))))) 2339 (setq term-current-row (1- term-height))))))
2340 2340
2341 ;;; Handle a character assuming (eq terminal-state 2) - 2341 ;;; Handle a character assuming (eq terminal-state 2) -
2342 ;;; i.e. we have previously seen Escape followed by ?[. 2342 ;;; i.e. we have previously seen Escape followed by ?[.