/[emacs]/emacs/lisp/term.el
ViewVC logotype

Diff of /emacs/lisp/term.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by rms, Mon Sep 20 15:59:31 2004 UTC revision 1.59 by dann, Sun Sep 26 18:39:10 2004 UTC
# Line 1  Line 1 
1  ;;; term.el --- general command interpreter in a window stuff  ;;; term.el --- general command interpreter in a window stuff
2    
3  ;;; Copyright (C) 1988, 1990, 1992, 1994, 1995 Free Software Foundation, Inc.  ;;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2004 Free Software Foundation, Inc.
4    
5  ;; Author: Per Bothner <bothner@cygnus.com>  ;; Author: Per Bothner <bothner@cygnus.com>
6  ;; Based on comint mode written by: Olin Shivers <shivers@cs.cmu.edu>  ;; Based on comint mode written by: Olin Shivers <shivers@cs.cmu.edu>
# Line 676  Buffer local variable.") Line 676  Buffer local variable.")
676  (defvar term-terminal-menu)  (defvar term-terminal-menu)
677    
678  ;;; Let's silence the byte-compiler -mm  ;;; Let's silence the byte-compiler -mm
 (defvar term-ansi-at-eval-string nil)  
679  (defvar term-ansi-at-host nil)  (defvar term-ansi-at-host nil)
680  (defvar term-ansi-at-dir nil)  (defvar term-ansi-at-dir nil)
681  (defvar term-ansi-at-user nil)  (defvar term-ansi-at-user nil)
# Line 692  Buffer local variable.") Line 691  Buffer local variable.")
691  (defvar term-ansi-current-highlight 0)  (defvar term-ansi-current-highlight 0)
692  (defvar term-ansi-current-reverse 0)  (defvar term-ansi-current-reverse 0)
693  (defvar term-ansi-current-invisible 0)  (defvar term-ansi-current-invisible 0)
 (defvar term-ansi-default-fg 0)  
 (defvar term-ansi-default-bg 0)  
 (defvar term-ansi-current-temp 0)  
694    
695  ;;; Four should be enough, if you want more, just add. -mm  ;;; Four should be enough, if you want more, just add. -mm
696  (defvar term-terminal-more-parameters 0)  (defvar term-terminal-more-parameters 0)
# Line 917  is buffer-local.") Line 913  is buffer-local.")
913      (define-key term-raw-map [backspace] 'term-send-backspace)      (define-key term-raw-map [backspace] 'term-send-backspace)
914      (define-key term-raw-map [home] 'term-send-home)      (define-key term-raw-map [home] 'term-send-home)
915      (define-key term-raw-map [end] 'term-send-end)      (define-key term-raw-map [end] 'term-send-end)
916        (define-key term-raw-map [S-prior] 'scroll-down)
917        (define-key term-raw-map [S-next] 'scroll-up)
918        (define-key term-raw-map [S-insert] 'term-paste)
919      (define-key term-raw-map [prior] 'term-send-prior)      (define-key term-raw-map [prior] 'term-send-prior)
920      (define-key term-raw-map [next] 'term-send-next)))      (define-key term-raw-map [next] 'term-send-next)))
921    
# Line 932  is buffer-local.") Line 931  is buffer-local.")
931    
932  (put 'term-mode 'mode-class 'special)  (put 'term-mode 'mode-class 'special)
933    
934    
935    ;;; Use this variable as a display table for `term-mode'.
936    (defvar term-display-table
937      (let ((dt (or (copy-sequence standard-display-table)
938                    (make-display-table)))
939            i)
940        ;; avoid changing the display table for ^J
941        (setq i 0)
942        (while (< i 10)
943          (aset dt i (vector i))
944          (setq i (1+ i)))
945        (setq i 11)
946        (while (< i 32)
947          (aset dt i (vector i))
948          (setq i (1+ i)))
949        (setq i 128)
950        (while (< i 256)
951          (aset dt i (vector i))
952          (setq i (1+ i)))
953        dt))
954    
955  (defun term-mode ()  (defun term-mode ()
956    "Major mode for interacting with an inferior interpreter.    "Major mode for interacting with an inferior interpreter.
957  The interpreter name is same as buffer name, sans the asterisks.  The interpreter name is same as buffer name, sans the asterisks.
# Line 981  Entry to this mode runs the hooks on `te Line 1001  Entry to this mode runs the hooks on `te
1001    (setq major-mode 'term-mode)    (setq major-mode 'term-mode)
1002    (setq mode-name "Term")    (setq mode-name "Term")
1003    (use-local-map term-mode-map)    (use-local-map term-mode-map)
1004      ;; we do not want indent to sneak in any tabs
1005      (setq indent-tabs-mode nil)
1006      (setq buffer-display-table term-display-table)
1007    (make-local-variable 'term-home-marker)    (make-local-variable 'term-home-marker)
1008    (setq term-home-marker (copy-marker 0))    (setq term-home-marker (copy-marker 0))
1009    (make-local-variable 'term-saved-home-marker)    (make-local-variable 'term-saved-home-marker)
# Line 1184  without any interpretation." Line 1207  without any interpretation."
1207                                          ((eq arg '-) -1)                                          ((eq arg '-) -1)
1208                                          (t (1- arg)))))))                                          (t (1- arg)))))))
1209    
1210    (defun term-paste ()
1211      "Insert the last stretch of killed text at point."
1212      (interactive)
1213       (term-send-raw-string (current-kill 0)))
1214    
1215  ;; Which would be better:  "\e[A" or "\eOA"? readline accepts either.  ;; Which would be better:  "\e[A" or "\eOA"? readline accepts either.
1216  ;; For my configuration it's definitely better \eOA but YMMV. -mm  ;; For my configuration it's definitely better \eOA but YMMV. -mm
1217  ;; For example: vi works with \eOA while elm wants \e[A ...  ;; For example: vi works with \eOA while elm wants \e[A ...
# Line 1195  without any interpretation." Line 1223  without any interpretation."
1223  (defun term-send-end   () (interactive) (term-send-raw-string "\e[4~"))  (defun term-send-end   () (interactive) (term-send-raw-string "\e[4~"))
1224  (defun term-send-prior () (interactive) (term-send-raw-string "\e[5~"))  (defun term-send-prior () (interactive) (term-send-raw-string "\e[5~"))
1225  (defun term-send-next  () (interactive) (term-send-raw-string "\e[6~"))  (defun term-send-next  () (interactive) (term-send-raw-string "\e[6~"))
1226  (defun term-send-del   () (interactive) (term-send-raw-string "\C-?"))  (defun term-send-del   () (interactive) (term-send-raw-string "\e[3~"))
1227  (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-H"))  (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-?"))
1228    
1229  (defun term-char-mode ()  (defun term-char-mode ()
1230    "Switch to char (\"raw\") sub-mode of term mode.    "Switch to char (\"raw\") sub-mode of term mode.
# Line 1366  The main purpose is to get rid of the lo Line 1394  The main purpose is to get rid of the lo
1394    "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH\    "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH\
1395  :nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt\  :nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt\
1396  :al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J\  :al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J\
 :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\  
1397  :dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\  :dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\
1398  :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\  :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\
1399  :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\  :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\
1400  :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\  :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\
1401  :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\  :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\
1402  :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m:"  :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\
1403    :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:"
1404  ;;; : -undefine ic  ;;; : -undefine ic
1405    ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
1406    "termcap capabilities supported")    "termcap capabilities supported")
1407    
1408  ;;; This auxiliary function cranks up the process for term-exec in  ;;; This auxiliary function cranks up the process for term-exec in
# Line 1400  The main purpose is to get rid of the lo Line 1429  The main purpose is to get rid of the lo
1429          (process-connection-type t)          (process-connection-type t)
1430          ;; We should suppress conversion of end-of-line format.          ;; We should suppress conversion of end-of-line format.
1431          (inhibit-eol-conversion t)          (inhibit-eol-conversion t)
1432          ;; inhibit-eol-conversion doesn't seem to do the job, but this does.          ;; The process's output contains not just chars but also binary
1433          (coding-system-for-read 'unknown-unix)          ;; escape codes, so we need to see the raw output.  We will have to
1434          )          ;; do the decoding by hand on the parts that are made of chars.
1435            (coding-system-for-read 'binary))
1436      (apply 'start-process name buffer      (apply 'start-process name buffer
1437             "/bin/sh" "-c"             "/bin/sh" "-c"
1438             (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\             (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\
# Line 2693  See `term-prompt-regexp'." Line 2723  See `term-prompt-regexp'."
2723                     (if (not funny) (setq funny str-length))                     (if (not funny) (setq funny str-length))
2724                     (cond ((> funny i)                     (cond ((> funny i)
2725                            (cond ((eq term-terminal-state 1)                            (cond ((eq term-terminal-state 1)
2726                                   (term-move-columns 1)                                   ;; We are in state 1, we need to wrap
2727                                     ;; around.  Go to the beginning of
2728                                     ;; the next line and switch to state
2729                                     ;; 0.
2730                                     (term-down 1)
2731                                     (term-move-columns (- (term-current-column)))
2732                                   (setq term-terminal-state 0)))                                   (setq term-terminal-state 0)))
2733                            (setq count (- funny i))                            (setq count (- funny i))
2734                            (setq temp (- (+ (term-horizontal-column) count)                            (setq temp (- (+ (term-horizontal-column) count)
# Line 2702  See `term-prompt-regexp'." Line 2737  See `term-prompt-regexp'."
2737                                  ((> count temp) ;; Some chars fit.                                  ((> count temp) ;; Some chars fit.
2738                                   ;; This iteration, handle only what fits.                                   ;; This iteration, handle only what fits.
2739                                   (setq count (- count temp))                                   (setq count (- count temp))
2740                                     (setq temp 0)
2741                                   (setq funny (+ count i)))                                   (setq funny (+ count i)))
2742                                  ((or (not (or term-pager-count                                  ((or (not (or term-pager-count
2743                                                term-scroll-with-delete))                                                term-scroll-with-delete))
# Line 2722  See `term-prompt-regexp'." Line 2758  See `term-prompt-regexp'."
2758                            ;; following point if not eob nor insert-mode.                            ;; following point if not eob nor insert-mode.
2759                            (let ((old-column (current-column))                            (let ((old-column (current-column))
2760                                  columns pos)                                  columns pos)
2761                              (insert (substring str i funny))                              (insert (decode-coding-string (substring str i funny) locale-coding-system))
2762                              (setq term-current-column (current-column)                              (setq term-current-column (current-column)
2763                                    columns (- term-current-column old-column))                                    columns (- term-current-column old-column))
2764                              (when (not (or (eobp) term-insert-mode))                              (when (not (or (eobp) term-insert-mode))
# Line 2741  See `term-prompt-regexp'." Line 2777  See `term-prompt-regexp'."
2777                                   (setq term-terminal-state 1)))                                   (setq term-terminal-state 1)))
2778                            (setq i (1- funny)))                            (setq i (1- funny)))
2779                           ((and (setq term-terminal-state 0)                           ((and (setq term-terminal-state 0)
2780                                 (eq char ?\^I)) ; TAB                                 (eq char ?\^I)) ; TAB (terminfo: ht)
2781                            ;; FIXME:  Does not handle line wrap!                            ;; FIXME:  Does not handle line wrap!
2782                            (setq count (term-current-column))                            (setq count (term-current-column))
2783                            (setq count (+ count 8 (- (mod count 8))))                            (setq count (+ count 8 (- (mod count 8))))
# Line 2768  See `term-prompt-regexp'." Line 2804  See `term-prompt-regexp'."
2804                            (if (not (and term-kill-echo-list                            (if (not (and term-kill-echo-list
2805                                          (term-check-kill-echo-list)))                                          (term-check-kill-echo-list)))
2806                                (term-down 1 t)))                                (term-down 1 t)))
2807                           ((eq char ?\b)                           ((eq char ?\b)  ;; (terminfo: cub1)
2808                            (term-move-columns -1))                            (term-move-columns -1))
2809                           ((eq char ?\033) ; Escape                           ((eq char ?\033) ; Escape
2810                            (setq term-terminal-state 2))                            (setq term-terminal-state 2))
# Line 2818  See `term-prompt-regexp'." Line 2854  See `term-prompt-regexp'."
2854                           ((eq char ?M) ;; scroll reversed                           ((eq char ?M) ;; scroll reversed
2855                            (term-insert-lines 1)                            (term-insert-lines 1)
2856                            (setq term-terminal-state 0))                            (setq term-terminal-state 0))
2857                           ((eq char ?7) ;; Save cursor                           ((eq char ?7) ;; Save cursor (terminfo: sc)
2858                            (term-handle-deferred-scroll)                            (term-handle-deferred-scroll)
2859                            (setq term-saved-cursor                            (setq term-saved-cursor
2860                                  (cons (term-current-row)                                  (cons (term-current-row)
2861                                        (term-horizontal-column)))                                        (term-horizontal-column)))
2862                            (setq term-terminal-state 0))                            (setq term-terminal-state 0))
2863                           ((eq char ?8) ;; Restore cursor                           ((eq char ?8) ;; Restore cursor (terminfo: rc)
2864                            (if term-saved-cursor                            (if term-saved-cursor
2865                                (term-goto (car term-saved-cursor)                                (term-goto (car term-saved-cursor)
2866                                           (cdr term-saved-cursor)))                                           (cdr term-saved-cursor)))
# Line 2976  See `term-prompt-regexp'." Line 3012  See `term-prompt-regexp'."
3012     ((eq parameter 8)     ((eq parameter 8)
3013      (setq term-ansi-current-invisible 1))      (setq term-ansi-current-invisible 1))
3014    
3015  ;;; Reset reverse (i.e. terminfo rmso)  ;;; Reset underline (i.e. terminfo rmul)
3016     ((eq parameter 24)     ((eq parameter 24)
3017      (setq term-ansi-current-reverse 0))      (setq term-ansi-current-underline 0))
3018    
3019  ;;; Reset underline (i.e. terminfo rmul)  ;;; Reset reverse (i.e. terminfo rmso)
3020     ((eq parameter 27)     ((eq parameter 27)
3021      (setq term-ansi-current-underline 0))      (setq term-ansi-current-reverse 0))
3022    
3023  ;;; Foreground  ;;; Foreground
3024     ((and (>= parameter 30) (<= parameter 37))     ((and (>= parameter 30) (<= parameter 37))
# Line 3097  See `term-prompt-regexp'." Line 3133  See `term-prompt-regexp'."
3133      (term-goto      (term-goto
3134       (1- term-terminal-previous-parameter)       (1- term-terminal-previous-parameter)
3135       (1- term-terminal-parameter)))       (1- term-terminal-parameter)))
3136     ;; \E[A - cursor up     ;; \E[A - cursor up (terminfo: cuu1)
3137     ((eq char ?A)     ((eq char ?A)
3138      (term-handle-deferred-scroll)      (term-handle-deferred-scroll)
3139      (term-down (- (max 1 term-terminal-parameter)) t))      (term-down (- (max 1 term-terminal-parameter)) t))
# Line 3110  See `term-prompt-regexp'." Line 3146  See `term-prompt-regexp'."
3146     ;; \E[D - cursor left     ;; \E[D - cursor left
3147     ((eq char ?D)     ((eq char ?D)
3148      (term-move-columns (- (max 1 term-terminal-parameter))))      (term-move-columns (- (max 1 term-terminal-parameter))))
3149     ;; \E[J - clear to end of screen     ;; \E[J - clear to end of screen (terminfo: ed, clear)
3150     ((eq char ?J)     ((eq char ?J)
3151      (term-erase-in-display term-terminal-parameter))      (term-erase-in-display term-terminal-parameter))
3152     ;; \E[K - clear to end of line     ;; \E[K - clear to end of line (terminfo: el, el1)
3153     ((eq char ?K)     ((eq char ?K)
3154      (term-erase-in-line term-terminal-parameter))      (term-erase-in-line term-terminal-parameter))
3155     ;; \E[L - insert lines     ;; \E[L - insert lines (terminfo: il, il1)
3156     ((eq char ?L)     ((eq char ?L)
3157      (term-insert-lines (max 1 term-terminal-parameter)))      (term-insert-lines (max 1 term-terminal-parameter)))
3158     ;; \E[M - delete lines     ;; \E[M - delete lines
# Line 3130  See `term-prompt-regexp'." Line 3166  See `term-prompt-regexp'."
3166      (term-insert-spaces (max 1 term-terminal-parameter)))      (term-insert-spaces (max 1 term-terminal-parameter)))
3167     ;; \E[?h - DEC Private Mode Set     ;; \E[?h - DEC Private Mode Set
3168     ((eq char ?h)     ((eq char ?h)
3169      (cond ((eq term-terminal-parameter 4)      (cond ((eq term-terminal-parameter 4)  ;; (terminfo: smir)
3170             (setq term-insert-mode t))             (setq term-insert-mode t))
3171            ((eq term-terminal-parameter 47)            ;; ((eq term-terminal-parameter 47) ;; (terminfo: smcup)
3172             (term-switch-to-alternate-sub-buffer t))))            ;; (term-switch-to-alternate-sub-buffer t))
3173              ))
3174     ;; \E[?l - DEC Private Mode Reset     ;; \E[?l - DEC Private Mode Reset
3175     ((eq char ?l)     ((eq char ?l)
3176      (cond ((eq term-terminal-parameter 4)      (cond ((eq term-terminal-parameter 4)  ;; (terminfo: rmir)
3177             (setq term-insert-mode nil))             (setq term-insert-mode nil))
3178            ((eq term-terminal-parameter 47)            ;; ((eq term-terminal-parameter 47) ;; (terminfo: rmcup)
3179             (term-switch-to-alternate-sub-buffer nil))))            ;; (term-switch-to-alternate-sub-buffer nil))
3180              ))
3181    
3182  ;;; Modified to allow ansi coloring -mm  ;;; Modified to allow ansi coloring -mm
3183     ;; \E[m - Set/reset standard mode     ;; \E[m - Set/reset modes, set bg/fg
3184       ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf)
3185     ((eq char ?m)     ((eq char ?m)
3186      (when (= term-terminal-more-parameters 1)      (when (= term-terminal-more-parameters 1)
3187        (if (>= term-terminal-previous-parameter-4 0)        (if (>= term-terminal-previous-parameter-4 0)
# Line 3186  The top-most line is line 0." Line 3225  The top-most line is line 0."
3225              (not (and (= term-scroll-start 0)              (not (and (= term-scroll-start 0)
3226                        (= term-scroll-end term-height))))))                        (= term-scroll-end term-height))))))
3227    
3228  (defun term-switch-to-alternate-sub-buffer (set)  ;; (defun term-switch-to-alternate-sub-buffer (set)
3229    ;; If asked to switch to (from) the alternate sub-buffer, and already (not)  ;;   ;; If asked to switch to (from) the alternate sub-buffer, and already (not)
3230    ;; using it, do nothing.  This test is needed for some programs (including  ;;   ;; using it, do nothing.  This test is needed for some programs (including
3231    ;; Emacs) that emit the ti termcap string twice, for unknown reason.  ;;   ;; Emacs) that emit the ti termcap string twice, for unknown reason.
3232    (term-handle-deferred-scroll)  ;;   (term-handle-deferred-scroll)
3233    (if (eq set (not (term-using-alternate-sub-buffer)))  ;;   (if (eq set (not (term-using-alternate-sub-buffer)))
3234        (let ((row (term-current-row))  ;;       (let ((row (term-current-row))
3235              (col (term-horizontal-column)))  ;;          (col (term-horizontal-column)))
3236          (cond (set  ;;      (cond (set
3237                 (goto-char (point-max))  ;;             (goto-char (point-max))
3238                 (if (not (eq (preceding-char) ?\n))  ;;             (if (not (eq (preceding-char) ?\n))
3239                     (term-insert-char ?\n 1))  ;;                 (term-insert-char ?\n 1))
3240                 (setq term-scroll-with-delete t)  ;;             (setq term-scroll-with-delete t)
3241                 (setq term-saved-home-marker (copy-marker term-home-marker))  ;;             (setq term-saved-home-marker (copy-marker term-home-marker))
3242                 (set-marker term-home-marker (point)))  ;;             (set-marker term-home-marker (point)))
3243                (t  ;;            (t
3244                 (setq term-scroll-with-delete  ;;             (setq term-scroll-with-delete
3245                       (not (and (= term-scroll-start 0)  ;;                   (not (and (= term-scroll-start 0)
3246                                 (= term-scroll-end term-height))))  ;;                             (= term-scroll-end term-height))))
3247                 (set-marker term-home-marker term-saved-home-marker)  ;;             (set-marker term-home-marker term-saved-home-marker)
3248                 (set-marker term-saved-home-marker nil)  ;;             (set-marker term-saved-home-marker nil)
3249                 (setq term-saved-home-marker nil)  ;;             (setq term-saved-home-marker nil)
3250                 (goto-char term-home-marker)))  ;;             (goto-char term-home-marker)))
3251          (setq term-current-column nil)  ;;      (setq term-current-column nil)
3252          (setq term-current-row 0)  ;;      (setq term-current-row 0)
3253          (term-goto row col))))  ;;      (term-goto row col))))
3254    
3255  ;; Default value for the symbol term-command-hook.  ;; Default value for the symbol term-command-hook.
3256    
# Line 3521  all pending output has been dealt with." Line 3560  all pending output has been dealt with."
3560    (if (not (bolp)) (insert-before-markers ?\n)))    (if (not (bolp)) (insert-before-markers ?\n)))
3561    
3562  (defun term-erase-in-line (kind)  (defun term-erase-in-line (kind)
3563    (if (> kind 1) ;; erase left of point    (if (= kind 1) ;; erase left of point
3564        (let ((cols (term-horizontal-column)) (saved-point (point)))        (let ((cols (term-horizontal-column)) (saved-point (point)))
3565          (term-vertical-motion 0)          (term-vertical-motion 0)
3566          (delete-region (point) saved-point)          (delete-region (point) saved-point)
3567          (term-insert-char ?\n cols)))          (term-insert-char ?  cols)))
3568    (if (not (eq kind 1)) ;; erase right of point    (if (not (eq kind 1)) ;; erase right of point
3569        (let ((saved-point (point))        (let ((saved-point (point))
3570              (wrapped (and (zerop (term-horizontal-column))              (wrapped (and (zerop (term-horizontal-column))
# Line 3624  Should only be called when point is at t Line 3663  Should only be called when point is at t
3663      (term-insert-char ?\n lines)      (term-insert-char ?\n lines)
3664      (goto-char start)))      (goto-char start)))
3665    
3666  (defun term-set-output-log (name)  (defun term-start-output-log (name)
3667    "Record raw inferior process output in a buffer."    "Record raw inferior process output in a buffer."
3668    (interactive (list (if term-log-buffer    (interactive (list (if term-log-buffer
3669                           nil                           nil
# Line 3646  Should only be called when point is at t Line 3685  Should only be called when point is at t
3685      (message "Recording terminal emulator output into buffer \"%s\""      (message "Recording terminal emulator output into buffer \"%s\""
3686               (buffer-name term-log-buffer))))               (buffer-name term-log-buffer))))
3687    
3688  (defun term-stop-photo ()  (defun term-stop-output-log ()
3689    "Discontinue raw inferior process logging."    "Discontinue raw inferior process logging."
3690    (interactive)    (interactive)
3691    (term-set-output-log nil))    (term-start-output-log nil))
3692    
3693  (defun term-show-maximum-output ()  (defun term-show-maximum-output ()
3694    "Put the end of the buffer at the bottom of the window."    "Put the end of the buffer at the bottom of the window."

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26