comparison lisp/term.el @ 13961:ff6ac63de609

(term-process-pager): Fix message spelling.
author Karl Heuer <kwzh@gnu.org>
date Thu, 04 Jan 1996 23:20:49 +0000
parents 84acc3adcd63
children 83f275dcd93a
comparison
equal deleted inserted replaced
13960:5f1ba0200a33 13961:ff6ac63de609
291 291
292 (defvar term-pager-break-map nil) 292 (defvar term-pager-break-map nil)
293 293
294 (defvar term-ptyp t 294 (defvar term-ptyp t
295 "True if communications via pty; false if by pipe. Buffer local. 295 "True if communications via pty; false if by pipe. Buffer local.
296 This is to work around a bug in emacs process signalling.") 296 This is to work around a bug in emacs process signaling.")
297 297
298 (defvar term-last-input-match "" 298 (defvar term-last-input-match ""
299 "Last string searched for by term input history search, for defaulting. 299 "Last string searched for by term input history search, for defaulting.
300 Buffer local variable.") 300 Buffer local variable.")
301 301
696 "Change term-escape-char and keymaps that depend on it." 696 "Change term-escape-char and keymaps that depend on it."
697 (if term-escape-char 697 (if term-escape-char
698 (define-key term-raw-map term-escape-char 'term-send-raw)) 698 (define-key term-raw-map term-escape-char 'term-send-raw))
699 (setq c (make-string 1 c)) 699 (setq c (make-string 1 c))
700 (define-key term-raw-map c term-raw-escape-map) 700 (define-key term-raw-map c term-raw-escape-map)
701 ;; Define standard binings in term-raw-escape-map 701 ;; Define standard bindings in term-raw-escape-map
702 (define-key term-raw-escape-map "\C-x" 702 (define-key term-raw-escape-map "\C-x"
703 (lookup-key (current-global-map) "\C-x")) 703 (lookup-key (current-global-map) "\C-x"))
704 (define-key term-raw-escape-map "\C-v" 704 (define-key term-raw-escape-map "\C-v"
705 (lookup-key (current-global-map) "\C-v")) 705 (lookup-key (current-global-map) "\C-v"))
706 (define-key term-raw-escape-map "\C-u" 706 (define-key term-raw-escape-map "\C-u"
859 :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ 859 :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
860 :dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\ 860 :dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\
861 :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\ 861 :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\
862 :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC" 862 :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC"
863 ;;; : -undefine ic 863 ;;; : -undefine ic
864 "termcap capabilties supported") 864 "termcap capabilities supported")
865 865
866 ;;; This auxiliary function cranks up the process for term-exec in 866 ;;; This auxiliary function cranks up the process for term-exec in
867 ;;; the appropriate environment. 867 ;;; the appropriate environment.
868 868
869 (defun term-exec-1 (name buffer command switches) 869 (defun term-exec-1 (name buffer command switches)
1982 0) 1982 0)
1983 ((> count 0) 1983 ((> count 0)
1984 (let ((H) 1984 (let ((H)
1985 (todo (+ count (/ (current-column) term-width)))) 1985 (todo (+ count (/ (current-column) term-width))))
1986 (end-of-line) 1986 (end-of-line)
1987 ;; The loop interates over buffer lines; 1987 ;; The loop iterates over buffer lines;
1988 ;; H is the number of screen lines in the current line, i.e. 1988 ;; H is the number of screen lines in the current line, i.e.
1989 ;; the ceiling of dividing the buffer line width by term-width. 1989 ;; the ceiling of dividing the buffer line width by term-width.
1990 (while (and (<= (setq H (max (/ (+ (current-column) term-width -1) 1990 (while (and (<= (setq H (max (/ (+ (current-column) term-width -1)
1991 term-width) 1991 term-width)
1992 1)) 1992 1))
2007 1)) 2007 1))
2008 todo) 2008 todo)
2009 (progn (beginning-of-line) 2009 (progn (beginning-of-line)
2010 (not (bobp)))) 2010 (not (bobp))))
2011 (setq todo (- todo H)) 2011 (setq todo (- todo H))
2012 (backward-char)) ;; Move to end of previos line 2012 (backward-char)) ;; Move to end of previous line.
2013 (if (and (>= todo H) (> todo 0)) 2013 (if (and (>= todo H) (> todo 0))
2014 (+ count todo (- 1 H)) ;; Hit beginning of buffer. 2014 (+ count todo (- 1 H)) ;; Hit beginning of buffer.
2015 (move-to-column (* (- H todo 1) term-width)) 2015 (move-to-column (* (- H todo 1) term-width))
2016 count))))) 2016 count)))))
2017 2017
2336 (term-vertical-motion count) 2336 (term-vertical-motion count)
2337 (set-marker term-home-marker (point)) 2337 (set-marker term-home-marker (point))
2338 (setq term-current-row (1- term-height)))))) 2338 (setq term-current-row (1- term-height))))))
2339 2339
2340 ;;; Handle a character assuming (eq terminal-state 2) - 2340 ;;; Handle a character assuming (eq terminal-state 2) -
2341 ;;; i.e. we have previousely seen Escape followed by ?[. 2341 ;;; i.e. we have previously seen Escape followed by ?[.
2342 2342
2343 (defun term-handle-ansi-escape (proc char) 2343 (defun term-handle-ansi-escape (proc char)
2344 (cond 2344 (cond
2345 ((eq char ?H) ; cursor motion 2345 ((eq char ?H) ; cursor motion
2346 (if (<= term-terminal-parameter 0) 2346 (if (<= term-terminal-parameter 0)
2421 (t))) 2421 (t)))
2422 2422
2423 (defun term-scroll-region (top bottom) 2423 (defun term-scroll-region (top bottom)
2424 "Set scrolling region. 2424 "Set scrolling region.
2425 TOP is the top-most line (inclusive) of the new scrolling region, 2425 TOP is the top-most line (inclusive) of the new scrolling region,
2426 while BOTTOM is the line folling the new scrolling region (e.g. exclusive). 2426 while BOTTOM is the line following the new scrolling region (e.g. exclusive).
2427 The top-most line is line 0." 2427 The top-most line is line 0."
2428 (setq term-scroll-start 2428 (setq term-scroll-start
2429 (if (or (< top 0) (>= top term-height)) 2429 (if (or (< top 0) (>= top term-height))
2430 0 2430 0
2431 top)) 2431 top))
2567 (define-key map [menu-bar terminal] term-terminal-menu) 2567 (define-key map [menu-bar terminal] term-terminal-menu)
2568 (define-key map [menu-bar signals] term-signals-menu) 2568 (define-key map [menu-bar signals] term-signals-menu)
2569 (setq tmp (make-sparse-keymap "More pages?")) 2569 (setq tmp (make-sparse-keymap "More pages?"))
2570 (define-key tmp [help] '("Help" . term-pager-help)) 2570 (define-key tmp [help] '("Help" . term-pager-help))
2571 (define-key tmp [disable] 2571 (define-key tmp [disable]
2572 '("Diable paging" . term-fake-pager-disable)) 2572 '("Disable paging" . term-fake-pager-disable))
2573 (define-key tmp [discard] 2573 (define-key tmp [discard]
2574 '("Discard remaining output" . term-pager-discard)) 2574 '("Discard remaining output" . term-pager-discard))
2575 (define-key tmp [eob] '("Goto to end" . term-pager-eob)) 2575 (define-key tmp [eob] '("Goto to end" . term-pager-eob))
2576 (define-key tmp [bob] '("Goto to beginning" . term-pager-bob)) 2576 (define-key tmp [bob] '("Goto to beginning" . term-pager-bob))
2577 (define-key tmp [line] '("1 line forwards" . term-pager-line)) 2577 (define-key tmp [line] '("1 line forwards" . term-pager-line))
2937 ;;; 2937 ;;;
2938 ;;; Commands like this are fine things to put in load hooks if you 2938 ;;; Commands like this are fine things to put in load hooks if you
2939 ;;; want them present in specific modes. 2939 ;;; want them present in specific modes.
2940 2940
2941 (defvar term-completion-autolist nil 2941 (defvar term-completion-autolist nil
2942 "*If non-nil, automatically list possiblities on partial completion. 2942 "*If non-nil, automatically list possibilities on partial completion.
2943 This mirrors the optional behavior of tcsh.") 2943 This mirrors the optional behavior of tcsh.")
2944 2944
2945 (defvar term-completion-addsuffix t 2945 (defvar term-completion-addsuffix t
2946 "*If non-nil, add a `/' to completed directories, ` ' to file names. 2946 "*If non-nil, add a `/' to completed directories, ` ' to file names.
2947 This mirrors the optional behavior of tcsh.") 2947 This mirrors the optional behavior of tcsh.")