/[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.49.6.5 by miles, Tue Sep 21 09:34:09 2004 UTC revision 1.49.6.6 by miles, Wed Sep 29 07:22:18 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 915  is buffer-local.") Line 911  is buffer-local.")
911      (define-key term-raw-map [backspace] 'term-send-backspace)      (define-key term-raw-map [backspace] 'term-send-backspace)
912      (define-key term-raw-map [home] 'term-send-home)      (define-key term-raw-map [home] 'term-send-home)
913      (define-key term-raw-map [end] 'term-send-end)      (define-key term-raw-map [end] 'term-send-end)
914        (define-key term-raw-map [S-prior] 'scroll-down)
915        (define-key term-raw-map [S-next] 'scroll-up)
916        (define-key term-raw-map [S-insert] 'term-paste)
917      (define-key term-raw-map [prior] 'term-send-prior)      (define-key term-raw-map [prior] 'term-send-prior)
918      (define-key term-raw-map [next] 'term-send-next)))      (define-key term-raw-map [next] 'term-send-next)))
919    
# Line 930  is buffer-local.") Line 929  is buffer-local.")
929    
930  (put 'term-mode 'mode-class 'special)  (put 'term-mode 'mode-class 'special)
931    
932    
933    ;;; Use this variable as a display table for `term-mode'.
934    (defvar term-display-table
935      (let ((dt (or (copy-sequence standard-display-table)
936                    (make-display-table)))
937            i)
938        ;; avoid changing the display table for ^J
939        (setq i 0)
940        (while (< i 10)
941          (aset dt i (vector i))
942          (setq i (1+ i)))
943        (setq i 11)
944        (while (< i 32)
945          (aset dt i (vector i))
946          (setq i (1+ i)))
947        (setq i 128)
948        (while (< i 256)
949          (aset dt i (vector i))
950          (setq i (1+ i)))
951        dt))
952    
953  (defun term-mode ()  (defun term-mode ()
954    "Major mode for interacting with an inferior interpreter.    "Major mode for interacting with an inferior interpreter.
955  The interpreter name is same as buffer name, sans the asterisks.  The interpreter name is same as buffer name, sans the asterisks.
# Line 979  Entry to this mode runs the hooks on `te Line 999  Entry to this mode runs the hooks on `te
999    (setq major-mode 'term-mode)    (setq major-mode 'term-mode)
1000    (setq mode-name "Term")    (setq mode-name "Term")
1001    (use-local-map term-mode-map)    (use-local-map term-mode-map)
1002      ;; we do not want indent to sneak in any tabs
1003      (setq indent-tabs-mode nil)
1004      (setq buffer-display-table term-display-table)
1005    (make-local-variable 'term-home-marker)    (make-local-variable 'term-home-marker)
1006    (setq term-home-marker (copy-marker 0))    (setq term-home-marker (copy-marker 0))
1007    (make-local-variable 'term-saved-home-marker)    (make-local-variable 'term-saved-home-marker)
# Line 1182  without any interpretation." Line 1205  without any interpretation."
1205                                          ((eq arg '-) -1)                                          ((eq arg '-) -1)
1206                                          (t (1- arg)))))))                                          (t (1- arg)))))))
1207    
1208    (defun term-paste ()
1209      "Insert the last stretch of killed text at point."
1210      (interactive)
1211       (term-send-raw-string (current-kill 0)))
1212    
1213  ;; Which would be better:  "\e[A" or "\eOA"? readline accepts either.  ;; Which would be better:  "\e[A" or "\eOA"? readline accepts either.
1214  ;; For my configuration it's definitely better \eOA but YMMV. -mm  ;; For my configuration it's definitely better \eOA but YMMV. -mm
1215  ;; For example: vi works with \eOA while elm wants \e[A ...  ;; For example: vi works with \eOA while elm wants \e[A ...
# Line 1193  without any interpretation." Line 1221  without any interpretation."
1221  (defun term-send-end   () (interactive) (term-send-raw-string "\e[4~"))  (defun term-send-end   () (interactive) (term-send-raw-string "\e[4~"))
1222  (defun term-send-prior () (interactive) (term-send-raw-string "\e[5~"))  (defun term-send-prior () (interactive) (term-send-raw-string "\e[5~"))
1223  (defun term-send-next  () (interactive) (term-send-raw-string "\e[6~"))  (defun term-send-next  () (interactive) (term-send-raw-string "\e[6~"))
1224  (defun term-send-del   () (interactive) (term-send-raw-string "\C-?"))  (defun term-send-del   () (interactive) (term-send-raw-string "\e[3~"))
1225  (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-H"))  (defun term-send-backspace  () (interactive) (term-send-raw-string "\C-?"))
1226    
1227  (defun term-char-mode ()  (defun term-char-mode ()
1228    "Switch to char (\"raw\") sub-mode of term mode.    "Switch to char (\"raw\") sub-mode of term mode.
# Line 1364  The main purpose is to get rid of the lo Line 1392  The main purpose is to get rid of the lo
1392    "%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\
1393  :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\
1394  :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\  
1395  :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:\
1396  :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\
1397  :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\  :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\
1398  :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~\
1399  :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\
1400  :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\
1401    :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:"
1402  ;;; : -undefine ic  ;;; : -undefine ic
1403    ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
1404    "termcap capabilities supported")    "termcap capabilities supported")
1405    
1406  ;;; This auxiliary function cranks up the process for term-exec in  ;;; This auxiliary function cranks up the process for term-exec in
# Line 1398  The main purpose is to get rid of the lo Line 1427  The main purpose is to get rid of the lo
1427          (process-connection-type t)          (process-connection-type t)
1428          ;; We should suppress conversion of end-of-line format.          ;; We should suppress conversion of end-of-line format.
1429          (inhibit-eol-conversion t)          (inhibit-eol-conversion t)
1430          ;; inhibit-eol-conversion doesn't seem to do the job, but this does.          ;; The process's output contains not just chars but also binary
1431          (coding-system-for-read 'unknown-unix)          ;; escape codes, so we need to see the raw output.  We will have to
1432          )          ;; do the decoding by hand on the parts that are made of chars.
1433            (coding-system-for-read 'binary))
1434      (apply 'start-process name buffer      (apply 'start-process name buffer
1435             "/bin/sh" "-c"             "/bin/sh" "-c"
1436             (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 2691  See `term-prompt-regexp'." Line 2721  See `term-prompt-regexp'."
2721                     (if (not funny) (setq funny str-length))                     (if (not funny) (setq funny str-length))
2722                     (cond ((> funny i)                     (cond ((> funny i)
2723                            (cond ((eq term-terminal-state 1)                            (cond ((eq term-terminal-state 1)
2724                                   (term-move-columns 1)                                   ;; We are in state 1, we need to wrap
2725                                     ;; around.  Go to the beginning of
2726                                     ;; the next line and switch to state
2727                                     ;; 0.
2728                                     (term-down 1)
2729                                     (term-move-columns (- (term-current-column)))
2730                                   (setq term-terminal-state 0)))                                   (setq term-terminal-state 0)))
2731                            (setq count (- funny i))                            (setq count (- funny i))
2732                            (setq temp (- (+ (term-horizontal-column) count)                            (setq temp (- (+ (term-horizontal-column) count)
# Line 2700  See `term-prompt-regexp'." Line 2735  See `term-prompt-regexp'."
2735                                  ((> count temp) ;; Some chars fit.                                  ((> count temp) ;; Some chars fit.
2736                                   ;; This iteration, handle only what fits.                                   ;; This iteration, handle only what fits.
2737                                   (setq count (- count temp))                                   (setq count (- count temp))
2738                                     (setq temp 0)
2739                                   (setq funny (+ count i)))                                   (setq funny (+ count i)))
2740                                  ((or (not (or term-pager-count                                  ((or (not (or term-pager-count
2741                                                term-scroll-with-delete))                                                term-scroll-with-delete))
# Line 2720  See `term-prompt-regexp'." Line 2756  See `term-prompt-regexp'."
2756                            ;; following point if not eob nor insert-mode.                            ;; following point if not eob nor insert-mode.
2757                            (let ((old-column (current-column))                            (let ((old-column (current-column))
2758                                  columns pos)                                  columns pos)
2759                              (insert (substring str i funny))                              (insert (decode-coding-string (substring str i funny) locale-coding-system))
2760                              (setq term-current-column (current-column)                              (setq term-current-column (current-column)
2761                                    columns (- term-current-column old-column))                                    columns (- term-current-column old-column))
2762                              (when (not (or (eobp) term-insert-mode))                              (when (not (or (eobp) term-insert-mode))
# Line 2739  See `term-prompt-regexp'." Line 2775  See `term-prompt-regexp'."
2775                                   (setq term-terminal-state 1)))                                   (setq term-terminal-state 1)))
2776                            (setq i (1- funny)))                            (setq i (1- funny)))
2777                           ((and (setq term-terminal-state 0)                           ((and (setq term-terminal-state 0)
2778                                 (eq char ?\^I)) ; TAB                                 (eq char ?\^I)) ; TAB (terminfo: ht)
2779                            ;; FIXME:  Does not handle line wrap!                            ;; FIXME:  Does not handle line wrap!
2780                            (setq count (term-current-column))                            (setq count (term-current-column))
2781                            (setq count (+ count 8 (- (mod count 8))))                            (setq count (+ count 8 (- (mod count 8))))
# Line 2766  See `term-prompt-regexp'." Line 2802  See `term-prompt-regexp'."
2802                            (if (not (and term-kill-echo-list                            (if (not (and term-kill-echo-list
2803                                          (term-check-kill-echo-list)))                                          (term-check-kill-echo-list)))
2804                                (term-down 1 t)))                                (term-down 1 t)))
2805                           ((eq char ?\b)                           ((eq char ?\b)  ;; (terminfo: cub1)
2806                            (term-move-columns -1))                            (term-move-columns -1))
2807                           ((eq char ?\033) ; Escape                           ((eq char ?\033) ; Escape
2808                            (setq term-terminal-state 2))                            (setq term-terminal-state 2))
# Line 2816  See `term-prompt-regexp'." Line 2852  See `term-prompt-regexp'."
2852                           ((eq char ?M) ;; scroll reversed                           ((eq char ?M) ;; scroll reversed
2853                            (term-insert-lines 1)                            (term-insert-lines 1)
2854                            (setq term-terminal-state 0))                            (setq term-terminal-state 0))
2855                           ((eq char ?7) ;; Save cursor                           ((eq char ?7) ;; Save cursor (terminfo: sc)
2856                            (term-handle-deferred-scroll)                            (term-handle-deferred-scroll)
2857                            (setq term-saved-cursor                            (setq term-saved-cursor
2858                                  (cons (term-current-row)                                  (cons (term-current-row)
2859                                        (term-horizontal-column)))                                        (term-horizontal-column)))
2860                            (setq term-terminal-state 0))                            (setq term-terminal-state 0))
2861                           ((eq char ?8) ;; Restore cursor                           ((eq char ?8) ;; Restore cursor (terminfo: rc)
2862                            (if term-saved-cursor                            (if term-saved-cursor
2863                                (term-goto (car term-saved-cursor)                                (term-goto (car term-saved-cursor)
2864                                           (cdr term-saved-cursor)))                                           (cdr term-saved-cursor)))
# Line 2974  See `term-prompt-regexp'." Line 3010  See `term-prompt-regexp'."
3010     ((eq parameter 8)     ((eq parameter 8)
3011      (setq term-ansi-current-invisible 1))      (setq term-ansi-current-invisible 1))
3012    
3013  ;;; Reset reverse (i.e. terminfo rmso)  ;;; Reset underline (i.e. terminfo rmul)
3014     ((eq parameter 24)     ((eq parameter 24)
3015      (setq term-ansi-current-reverse 0))      (setq term-ansi-current-underline 0))
3016    
3017  ;;; Reset underline (i.e. terminfo rmul)  ;;; Reset reverse (i.e. terminfo rmso)
3018     ((eq parameter 27)     ((eq parameter 27)
3019      (setq term-ansi-current-underline 0))      (setq term-ansi-current-reverse 0))
3020    
3021  ;;; Foreground  ;;; Foreground
3022     ((and (>= parameter 30) (<= parameter 37))     ((and (>= parameter 30) (<= parameter 37))
# Line 3095  See `term-prompt-regexp'." Line 3131  See `term-prompt-regexp'."
3131      (term-goto      (term-goto
3132       (1- term-terminal-previous-parameter)       (1- term-terminal-previous-parameter)
3133       (1- term-terminal-parameter)))       (1- term-terminal-parameter)))
3134     ;; \E[A - cursor up     ;; \E[A - cursor up (terminfo: cuu1)
3135     ((eq char ?A)     ((eq char ?A)
3136      (term-handle-deferred-scroll)      (term-handle-deferred-scroll)
3137      (term-down (- (max 1 term-terminal-parameter)) t))      (term-down (- (max 1 term-terminal-parameter)) t))
# Line 3108  See `term-prompt-regexp'." Line 3144  See `term-prompt-regexp'."
3144     ;; \E[D - cursor left     ;; \E[D - cursor left
3145     ((eq char ?D)     ((eq char ?D)
3146      (term-move-columns (- (max 1 term-terminal-parameter))))      (term-move-columns (- (max 1 term-terminal-parameter))))
3147     ;; \E[J - clear to end of screen     ;; \E[J - clear to end of screen (terminfo: ed, clear)
3148     ((eq char ?J)     ((eq char ?J)
3149      (term-erase-in-display term-terminal-parameter))      (term-erase-in-display term-terminal-parameter))
3150     ;; \E[K - clear to end of line     ;; \E[K - clear to end of line (terminfo: el, el1)
3151     ((eq char ?K)     ((eq char ?K)
3152      (term-erase-in-line term-terminal-parameter))      (term-erase-in-line term-terminal-parameter))
3153     ;; \E[L - insert lines     ;; \E[L - insert lines (terminfo: il, il1)
3154     ((eq char ?L)     ((eq char ?L)
3155      (term-insert-lines (max 1 term-terminal-parameter)))      (term-insert-lines (max 1 term-terminal-parameter)))
3156     ;; \E[M - delete lines     ;; \E[M - delete lines
# Line 3128  See `term-prompt-regexp'." Line 3164  See `term-prompt-regexp'."
3164      (term-insert-spaces (max 1 term-terminal-parameter)))      (term-insert-spaces (max 1 term-terminal-parameter)))
3165     ;; \E[?h - DEC Private Mode Set     ;; \E[?h - DEC Private Mode Set
3166     ((eq char ?h)     ((eq char ?h)
3167      (cond ((eq term-terminal-parameter 4)      (cond ((eq term-terminal-parameter 4)  ;; (terminfo: smir)
3168             (setq term-insert-mode t))             (setq term-insert-mode t))
3169            ((eq term-terminal-parameter 47)            ;; ((eq term-terminal-parameter 47) ;; (terminfo: smcup)
3170             (term-switch-to-alternate-sub-buffer t))))            ;; (term-switch-to-alternate-sub-buffer t))
3171              ))
3172     ;; \E[?l - DEC Private Mode Reset     ;; \E[?l - DEC Private Mode Reset
3173     ((eq char ?l)     ((eq char ?l)
3174      (cond ((eq term-terminal-parameter 4)      (cond ((eq term-terminal-parameter 4)  ;; (terminfo: rmir)
3175             (setq term-insert-mode nil))             (setq term-insert-mode nil))
3176            ((eq term-terminal-parameter 47)            ;; ((eq term-terminal-parameter 47) ;; (terminfo: rmcup)
3177             (term-switch-to-alternate-sub-buffer nil))))            ;; (term-switch-to-alternate-sub-buffer nil))
3178              ))
3179    
3180  ;;; Modified to allow ansi coloring -mm  ;;; Modified to allow ansi coloring -mm
3181     ;; \E[m - Set/reset standard mode     ;; \E[m - Set/reset modes, set bg/fg
3182       ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf)
3183     ((eq char ?m)     ((eq char ?m)
3184      (when (= term-terminal-more-parameters 1)      (when (= term-terminal-more-parameters 1)
3185        (if (>= term-terminal-previous-parameter-4 0)        (if (>= term-terminal-previous-parameter-4 0)
# Line 3184  The top-most line is line 0." Line 3223  The top-most line is line 0."
3223              (not (and (= term-scroll-start 0)              (not (and (= term-scroll-start 0)
3224                        (= term-scroll-end term-height))))))                        (= term-scroll-end term-height))))))
3225    
3226  (defun term-switch-to-alternate-sub-buffer (set)  ;; (defun term-switch-to-alternate-sub-buffer (set)
3227    ;; 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)
3228    ;; using it, do nothing.  This test is needed for some programs (including  ;;   ;; using it, do nothing.  This test is needed for some programs (including
3229    ;; Emacs) that emit the ti termcap string twice, for unknown reason.  ;;   ;; Emacs) that emit the ti termcap string twice, for unknown reason.
3230    (term-handle-deferred-scroll)  ;;   (term-handle-deferred-scroll)
3231    (if (eq set (not (term-using-alternate-sub-buffer)))  ;;   (if (eq set (not (term-using-alternate-sub-buffer)))
3232        (let ((row (term-current-row))  ;;       (let ((row (term-current-row))
3233              (col (term-horizontal-column)))  ;;          (col (term-horizontal-column)))
3234          (cond (set  ;;      (cond (set
3235                 (goto-char (point-max))  ;;             (goto-char (point-max))
3236                 (if (not (eq (preceding-char) ?\n))  ;;             (if (not (eq (preceding-char) ?\n))
3237                     (term-insert-char ?\n 1))  ;;                 (term-insert-char ?\n 1))
3238                 (setq term-scroll-with-delete t)  ;;             (setq term-scroll-with-delete t)
3239                 (setq term-saved-home-marker (copy-marker term-home-marker))  ;;             (setq term-saved-home-marker (copy-marker term-home-marker))
3240                 (set-marker term-home-marker (point)))  ;;             (set-marker term-home-marker (point)))
3241                (t  ;;            (t
3242                 (setq term-scroll-with-delete  ;;             (setq term-scroll-with-delete
3243                       (not (and (= term-scroll-start 0)  ;;                   (not (and (= term-scroll-start 0)
3244                                 (= term-scroll-end term-height))))  ;;                             (= term-scroll-end term-height))))
3245                 (set-marker term-home-marker term-saved-home-marker)  ;;             (set-marker term-home-marker term-saved-home-marker)
3246                 (set-marker term-saved-home-marker nil)  ;;             (set-marker term-saved-home-marker nil)
3247                 (setq term-saved-home-marker nil)  ;;             (setq term-saved-home-marker nil)
3248                 (goto-char term-home-marker)))  ;;             (goto-char term-home-marker)))
3249          (setq term-current-column nil)  ;;      (setq term-current-column nil)
3250          (setq term-current-row 0)  ;;      (setq term-current-row 0)
3251          (term-goto row col))))  ;;      (term-goto row col))))
3252    
3253  ;; Default value for the symbol term-command-hook.  ;; Default value for the symbol term-command-hook.
3254    
# Line 3519  all pending output has been dealt with." Line 3558  all pending output has been dealt with."
3558    (if (not (bolp)) (insert-before-markers ?\n)))    (if (not (bolp)) (insert-before-markers ?\n)))
3559    
3560  (defun term-erase-in-line (kind)  (defun term-erase-in-line (kind)
3561    (if (> kind 1) ;; erase left of point    (if (= kind 1) ;; erase left of point
3562        (let ((cols (term-horizontal-column)) (saved-point (point)))        (let ((cols (term-horizontal-column)) (saved-point (point)))
3563          (term-vertical-motion 0)          (term-vertical-motion 0)
3564          (delete-region (point) saved-point)          (delete-region (point) saved-point)
3565          (term-insert-char ?\n cols)))          (term-insert-char ?  cols)))
3566    (if (not (eq kind 1)) ;; erase right of point    (if (not (eq kind 1)) ;; erase right of point
3567        (let ((saved-point (point))        (let ((saved-point (point))
3568              (wrapped (and (zerop (term-horizontal-column))              (wrapped (and (zerop (term-horizontal-column))
# Line 3622  Should only be called when point is at t Line 3661  Should only be called when point is at t
3661      (term-insert-char ?\n lines)      (term-insert-char ?\n lines)
3662      (goto-char start)))      (goto-char start)))
3663    
3664  (defun term-set-output-log (name)  (defun term-start-output-log (name)
3665    "Record raw inferior process output in a buffer."    "Record raw inferior process output in a buffer."
3666    (interactive (list (if term-log-buffer    (interactive (list (if term-log-buffer
3667                           nil                           nil
# Line 3644  Should only be called when point is at t Line 3683  Should only be called when point is at t
3683      (message "Recording terminal emulator output into buffer \"%s\""      (message "Recording terminal emulator output into buffer \"%s\""
3684               (buffer-name term-log-buffer))))               (buffer-name term-log-buffer))))
3685    
3686  (defun term-stop-photo ()  (defun term-stop-output-log ()
3687    "Discontinue raw inferior process logging."    "Discontinue raw inferior process logging."
3688    (interactive)    (interactive)
3689    (term-set-output-log nil))    (term-start-output-log nil))
3690    
3691  (defun term-show-maximum-output ()  (defun term-show-maximum-output ()
3692    "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.49.6.5  
changed lines
  Added in v.1.49.6.6

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